@things-factory/learning 0.0.0-stage → 10.1.260
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/bootstrap.d.ts +2 -0
- package/dist-client/bootstrap.js +4 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/components/learning-assign-form.d.ts +24 -0
- package/dist-client/components/learning-assign-form.js +77 -0
- package/dist-client/components/learning-assign-form.js.map +1 -0
- package/dist-client/components/learning-course-form.d.ts +29 -0
- package/dist-client/components/learning-course-form.js +104 -0
- package/dist-client/components/learning-course-form.js.map +1 -0
- package/dist-client/components/learning-question-form.d.ts +33 -0
- package/dist-client/components/learning-question-form.js +142 -0
- package/dist-client/components/learning-question-form.js.map +1 -0
- package/dist-client/components/learning-todo.d.ts +12 -0
- package/dist-client/components/learning-todo.js +43 -0
- package/dist-client/components/learning-todo.js.map +1 -0
- package/dist-client/components/learning-unit-form.d.ts +41 -0
- package/dist-client/components/learning-unit-form.js +143 -0
- package/dist-client/components/learning-unit-form.js.map +1 -0
- package/dist-client/index.d.ts +2 -0
- package/dist-client/index.js +3 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/learning-course-editor.d.ts +62 -0
- package/dist-client/pages/learning-course-editor.js +463 -0
- package/dist-client/pages/learning-course-editor.js.map +1 -0
- package/dist-client/pages/learning-course-list.d.ts +37 -0
- package/dist-client/pages/learning-course-list.js +88 -0
- package/dist-client/pages/learning-course-list.js.map +1 -0
- package/dist-client/pages/learning-enrollment-status.d.ts +53 -0
- package/dist-client/pages/learning-enrollment-status.js +228 -0
- package/dist-client/pages/learning-enrollment-status.js.map +1 -0
- package/dist-client/pages/learning-view.d.ts +52 -0
- package/dist-client/pages/learning-view.js +371 -0
- package/dist-client/pages/learning-view.js.map +1 -0
- package/dist-client/pages/my-learning.d.ts +22 -0
- package/dist-client/pages/my-learning.js +110 -0
- package/dist-client/pages/my-learning.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +21 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/utils/learning-api.d.ts +16 -0
- package/dist-client/utils/learning-api.js +36 -0
- package/dist-client/utils/learning-api.js.map +1 -0
- package/dist-client/utils/learning-words.d.ts +20 -0
- package/dist-client/utils/learning-words.js +22 -0
- package/dist-client/utils/learning-words.js.map +1 -0
- package/dist-server/activities.d.ts +38 -0
- package/dist-server/activities.js +42 -0
- package/dist-server/activities.js.map +1 -0
- package/dist-server/ai-reads.d.ts +9 -0
- package/dist-server/ai-reads.js +70 -0
- package/dist-server/ai-reads.js.map +1 -0
- package/dist-server/attachment-reader.d.ts +1 -0
- package/dist-server/attachment-reader.js +23 -0
- package/dist-server/attachment-reader.js.map +1 -0
- package/dist-server/index.d.ts +4 -0
- package/dist-server/index.js +33 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/learning-subjects.d.ts +10 -0
- package/dist-server/learning-subjects.js +31 -0
- package/dist-server/learning-subjects.js.map +1 -0
- package/dist-server/role-tasks.d.ts +2 -0
- package/dist-server/role-tasks.js +17 -0
- package/dist-server/role-tasks.js.map +1 -0
- package/dist-server/service/course/course-mutation.d.ts +19 -0
- package/dist-server/service/course/course-mutation.js +176 -0
- package/dist-server/service/course/course-mutation.js.map +1 -0
- package/dist-server/service/course/course-query.d.ts +26 -0
- package/dist-server/service/course/course-query.js +172 -0
- package/dist-server/service/course/course-query.js.map +1 -0
- package/dist-server/service/course/course-question.d.ts +41 -0
- package/dist-server/service/course/course-question.js +116 -0
- package/dist-server/service/course/course-question.js.map +1 -0
- package/dist-server/service/course/course-rules.d.ts +49 -0
- package/dist-server/service/course/course-rules.js +89 -0
- package/dist-server/service/course/course-rules.js.map +1 -0
- package/dist-server/service/course/course-service.d.ts +71 -0
- package/dist-server/service/course/course-service.js +402 -0
- package/dist-server/service/course/course-service.js.map +1 -0
- package/dist-server/service/course/course-type.d.ts +55 -0
- package/dist-server/service/course/course-type.js +198 -0
- package/dist-server/service/course/course-type.js.map +1 -0
- package/dist-server/service/course/course-unit.d.ts +36 -0
- package/dist-server/service/course/course-unit.js +123 -0
- package/dist-server/service/course/course-unit.js.map +1 -0
- package/dist-server/service/course/course-version.d.ts +45 -0
- package/dist-server/service/course/course-version.js +151 -0
- package/dist-server/service/course/course-version.js.map +1 -0
- package/dist-server/service/course/course.d.ts +23 -0
- package/dist-server/service/course/course.js +92 -0
- package/dist-server/service/course/course.js.map +1 -0
- package/dist-server/service/course/index.d.ts +14 -0
- package/dist-server/service/course/index.js +24 -0
- package/dist-server/service/course/index.js.map +1 -0
- package/dist-server/service/enrollment/enrollment-mutation.d.ts +11 -0
- package/dist-server/service/enrollment/enrollment-mutation.js +124 -0
- package/dist-server/service/enrollment/enrollment-mutation.js.map +1 -0
- package/dist-server/service/enrollment/enrollment-query.d.ts +23 -0
- package/dist-server/service/enrollment/enrollment-query.js +245 -0
- package/dist-server/service/enrollment/enrollment-query.js.map +1 -0
- package/dist-server/service/enrollment/enrollment-remind.d.ts +1 -0
- package/dist-server/service/enrollment/enrollment-remind.js +45 -0
- package/dist-server/service/enrollment/enrollment-remind.js.map +1 -0
- package/dist-server/service/enrollment/enrollment-service.d.ts +110 -0
- package/dist-server/service/enrollment/enrollment-service.js +417 -0
- package/dist-server/service/enrollment/enrollment-service.js.map +1 -0
- package/dist-server/service/enrollment/enrollment-status.d.ts +40 -0
- package/dist-server/service/enrollment/enrollment-status.js +135 -0
- package/dist-server/service/enrollment/enrollment-status.js.map +1 -0
- package/dist-server/service/enrollment/enrollment-type.d.ts +95 -0
- package/dist-server/service/enrollment/enrollment-type.js +341 -0
- package/dist-server/service/enrollment/enrollment-type.js.map +1 -0
- package/dist-server/service/enrollment/enrollment.d.ts +52 -0
- package/dist-server/service/enrollment/enrollment.js +186 -0
- package/dist-server/service/enrollment/enrollment.js.map +1 -0
- package/dist-server/service/enrollment/index.d.ts +15 -0
- package/dist-server/service/enrollment/index.js +26 -0
- package/dist-server/service/enrollment/index.js.map +1 -0
- package/dist-server/service/enrollment/learning-ai.d.ts +38 -0
- package/dist-server/service/enrollment/learning-ai.js +96 -0
- package/dist-server/service/enrollment/learning-ai.js.map +1 -0
- package/dist-server/service/enrollment/learning-documents.d.ts +7 -0
- package/dist-server/service/enrollment/learning-documents.js +160 -0
- package/dist-server/service/enrollment/learning-documents.js.map +1 -0
- package/dist-server/service/enrollment/learning-outcome.d.ts +10 -0
- package/dist-server/service/enrollment/learning-outcome.js +16 -0
- package/dist-server/service/enrollment/learning-outcome.js.map +1 -0
- package/dist-server/service/enrollment/progress-rules.d.ts +94 -0
- package/dist-server/service/enrollment/progress-rules.js +97 -0
- package/dist-server/service/enrollment/progress-rules.js.map +1 -0
- package/dist-server/service/enrollment/quiz-attempt.d.ts +34 -0
- package/dist-server/service/enrollment/quiz-attempt.js +105 -0
- package/dist-server/service/enrollment/quiz-attempt.js.map +1 -0
- package/dist-server/service/enrollment/unit-progress.d.ts +30 -0
- package/dist-server/service/enrollment/unit-progress.js +114 -0
- package/dist-server/service/enrollment/unit-progress.js.map +1 -0
- package/dist-server/service/index.d.ts +14 -0
- package/dist-server/service/index.js +43 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +56 -4
- package/things-factory.config.js +14 -0
- package/translations/en.json +255 -0
- package/translations/es.json +255 -0
- package/translations/ja.json +255 -0
- package/translations/ko.json +255 -0
- package/translations/ms.json +255 -0
- package/translations/zh.json +255 -0
- package/README.md +0 -3
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LearningContent = exports.LearningContentUnit = exports.LearningEnrollmentList = exports.LearningEnrollmentRow = exports.LearningAudienceInput = exports.EnrollmentStatusList = exports.EnrollmentStatusSummary = exports.EnrollmentStatusRow = exports.EnrollmentStatusFilter = exports.LearningTickResult = exports.QuizResultView = exports.QuizAttemptView = exports.QuizQuestionView = exports.QuizChoiceView = exports.LearningUnit = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
7
|
+
const course_1 = require("../course/course");
|
|
8
|
+
const course_unit_1 = require("../course/course-unit");
|
|
9
|
+
const enrollment_1 = require("./enrollment");
|
|
10
|
+
const unit_progress_1 = require("./unit-progress");
|
|
11
|
+
let LearningUnit = class LearningUnit {
|
|
12
|
+
};
|
|
13
|
+
exports.LearningUnit = LearningUnit;
|
|
14
|
+
tslib_1.__decorate([
|
|
15
|
+
(0, type_graphql_1.Field)(type => course_unit_1.CourseUnit, { description: 'The unit.' }),
|
|
16
|
+
tslib_1.__metadata("design:type", course_unit_1.CourseUnit)
|
|
17
|
+
], LearningUnit.prototype, "unit", void 0);
|
|
18
|
+
tslib_1.__decorate([
|
|
19
|
+
(0, type_graphql_1.Field)(type => unit_progress_1.UnitProgress, { nullable: true, description: 'How far the learner went - none before they started it.' }),
|
|
20
|
+
tslib_1.__metadata("design:type", unit_progress_1.UnitProgress)
|
|
21
|
+
], LearningUnit.prototype, "progress", void 0);
|
|
22
|
+
tslib_1.__decorate([
|
|
23
|
+
(0, type_graphql_1.Field)({ description: 'Whether it counts toward completion - a link does not.' }),
|
|
24
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
25
|
+
], LearningUnit.prototype, "counts", void 0);
|
|
26
|
+
exports.LearningUnit = LearningUnit = tslib_1.__decorate([
|
|
27
|
+
(0, type_graphql_1.ObjectType)({ description: 'A unit as its learner sees it - with how far they went through it' })
|
|
28
|
+
], LearningUnit);
|
|
29
|
+
let QuizChoiceView = class QuizChoiceView {
|
|
30
|
+
};
|
|
31
|
+
exports.QuizChoiceView = QuizChoiceView;
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
(0, type_graphql_1.Field)({ description: 'The choice id.' }),
|
|
34
|
+
tslib_1.__metadata("design:type", String)
|
|
35
|
+
], QuizChoiceView.prototype, "id", void 0);
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
(0, type_graphql_1.Field)({ description: 'What it says.' }),
|
|
38
|
+
tslib_1.__metadata("design:type", String)
|
|
39
|
+
], QuizChoiceView.prototype, "text", void 0);
|
|
40
|
+
exports.QuizChoiceView = QuizChoiceView = tslib_1.__decorate([
|
|
41
|
+
(0, type_graphql_1.ObjectType)({ description: 'A choice as a learner is drawn it - never whether it is right' })
|
|
42
|
+
], QuizChoiceView);
|
|
43
|
+
let QuizQuestionView = class QuizQuestionView {
|
|
44
|
+
};
|
|
45
|
+
exports.QuizQuestionView = QuizQuestionView;
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
(0, type_graphql_1.Field)({ description: 'The question id.' }),
|
|
48
|
+
tslib_1.__metadata("design:type", String)
|
|
49
|
+
], QuizQuestionView.prototype, "id", void 0);
|
|
50
|
+
tslib_1.__decorate([
|
|
51
|
+
(0, type_graphql_1.Field)({ description: 'SINGLE, MULTIPLE or TRUE_FALSE.' }),
|
|
52
|
+
tslib_1.__metadata("design:type", String)
|
|
53
|
+
], QuizQuestionView.prototype, "kind", void 0);
|
|
54
|
+
tslib_1.__decorate([
|
|
55
|
+
(0, type_graphql_1.Field)({ description: 'What it asks.' }),
|
|
56
|
+
tslib_1.__metadata("design:type", String)
|
|
57
|
+
], QuizQuestionView.prototype, "text", void 0);
|
|
58
|
+
tslib_1.__decorate([
|
|
59
|
+
(0, type_graphql_1.Field)(type => [QuizChoiceView], { description: 'Its choices, shuffled.' }),
|
|
60
|
+
tslib_1.__metadata("design:type", Array)
|
|
61
|
+
], QuizQuestionView.prototype, "choices", void 0);
|
|
62
|
+
exports.QuizQuestionView = QuizQuestionView = tslib_1.__decorate([
|
|
63
|
+
(0, type_graphql_1.ObjectType)({ description: 'A question as a learner is drawn it - its choices in the order shown, no answer' })
|
|
64
|
+
], QuizQuestionView);
|
|
65
|
+
let QuizAttemptView = class QuizAttemptView {
|
|
66
|
+
};
|
|
67
|
+
exports.QuizAttemptView = QuizAttemptView;
|
|
68
|
+
tslib_1.__decorate([
|
|
69
|
+
(0, type_graphql_1.Field)({ description: 'The attempt id - its answers are sent with it.' }),
|
|
70
|
+
tslib_1.__metadata("design:type", String)
|
|
71
|
+
], QuizAttemptView.prototype, "attemptId", void 0);
|
|
72
|
+
tslib_1.__decorate([
|
|
73
|
+
(0, type_graphql_1.Field)(type => [QuizQuestionView], { description: 'The questions drawn, shuffled.' }),
|
|
74
|
+
tslib_1.__metadata("design:type", Array)
|
|
75
|
+
], QuizAttemptView.prototype, "questions", void 0);
|
|
76
|
+
exports.QuizAttemptView = QuizAttemptView = tslib_1.__decorate([
|
|
77
|
+
(0, type_graphql_1.ObjectType)({ description: 'An attempt as a learner is drawn it' })
|
|
78
|
+
], QuizAttemptView);
|
|
79
|
+
let QuizResultView = class QuizResultView {
|
|
80
|
+
};
|
|
81
|
+
exports.QuizResultView = QuizResultView;
|
|
82
|
+
tslib_1.__decorate([
|
|
83
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The score, out of 100.' }),
|
|
84
|
+
tslib_1.__metadata("design:type", Number)
|
|
85
|
+
], QuizResultView.prototype, "score", void 0);
|
|
86
|
+
tslib_1.__decorate([
|
|
87
|
+
(0, type_graphql_1.Field)({ description: 'Whether it passed.' }),
|
|
88
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
89
|
+
], QuizResultView.prototype, "passed", void 0);
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Attempts left - no limit when empty.' }),
|
|
92
|
+
tslib_1.__metadata("design:type", Number)
|
|
93
|
+
], QuizResultView.prototype, "attemptsLeft", void 0);
|
|
94
|
+
tslib_1.__decorate([
|
|
95
|
+
(0, type_graphql_1.Field)(type => enrollment_1.Enrollment, { description: 'The enrolment after it - completed when nothing else is missing.' }),
|
|
96
|
+
tslib_1.__metadata("design:type", enrollment_1.Enrollment)
|
|
97
|
+
], QuizResultView.prototype, "enrollment", void 0);
|
|
98
|
+
exports.QuizResultView = QuizResultView = tslib_1.__decorate([
|
|
99
|
+
(0, type_graphql_1.ObjectType)({ description: "An attempt's result - the score and whether it passed; never the right answers" })
|
|
100
|
+
], QuizResultView);
|
|
101
|
+
let LearningTickResult = class LearningTickResult {
|
|
102
|
+
};
|
|
103
|
+
exports.LearningTickResult = LearningTickResult;
|
|
104
|
+
tslib_1.__decorate([
|
|
105
|
+
(0, type_graphql_1.Field)(type => enrollment_1.Enrollment, { description: 'The enrolment.' }),
|
|
106
|
+
tslib_1.__metadata("design:type", enrollment_1.Enrollment)
|
|
107
|
+
], LearningTickResult.prototype, "enrollment", void 0);
|
|
108
|
+
tslib_1.__decorate([
|
|
109
|
+
(0, type_graphql_1.Field)(type => unit_progress_1.UnitProgress, { description: "The unit's progress." }),
|
|
110
|
+
tslib_1.__metadata("design:type", unit_progress_1.UnitProgress)
|
|
111
|
+
], LearningTickResult.prototype, "progress", void 0);
|
|
112
|
+
exports.LearningTickResult = LearningTickResult = tslib_1.__decorate([
|
|
113
|
+
(0, type_graphql_1.ObjectType)({ description: "A tick's result - the unit's progress and the enrolment after it" })
|
|
114
|
+
], LearningTickResult);
|
|
115
|
+
let EnrollmentStatusFilter = class EnrollmentStatusFilter {
|
|
116
|
+
};
|
|
117
|
+
exports.EnrollmentStatusFilter = EnrollmentStatusFilter;
|
|
118
|
+
tslib_1.__decorate([
|
|
119
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'A course.' }),
|
|
120
|
+
tslib_1.__metadata("design:type", String)
|
|
121
|
+
], EnrollmentStatusFilter.prototype, "courseId", void 0);
|
|
122
|
+
tslib_1.__decorate([
|
|
123
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Who asked - compliance.training-session, learning.direct ...' }),
|
|
124
|
+
tslib_1.__metadata("design:type", String)
|
|
125
|
+
], EnrollmentStatusFilter.prototype, "sourceKind", void 0);
|
|
126
|
+
tslib_1.__decorate([
|
|
127
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The record that asked - with sourceKind.' }),
|
|
128
|
+
tslib_1.__metadata("design:type", String)
|
|
129
|
+
], EnrollmentStatusFilter.prototype, "sourceId", void 0);
|
|
130
|
+
tslib_1.__decorate([
|
|
131
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'ASSIGNED, IN_PROGRESS, COMPLETED, CANCELLED or OVERDUE.' }),
|
|
132
|
+
tslib_1.__metadata("design:type", String)
|
|
133
|
+
], EnrollmentStatusFilter.prototype, "state", void 0);
|
|
134
|
+
exports.EnrollmentStatusFilter = EnrollmentStatusFilter = tslib_1.__decorate([
|
|
135
|
+
(0, type_graphql_1.InputType)({ description: 'Which enrolments to read' })
|
|
136
|
+
], EnrollmentStatusFilter);
|
|
137
|
+
let EnrollmentStatusRow = class EnrollmentStatusRow {
|
|
138
|
+
};
|
|
139
|
+
exports.EnrollmentStatusRow = EnrollmentStatusRow;
|
|
140
|
+
tslib_1.__decorate([
|
|
141
|
+
(0, type_graphql_1.Field)({ description: 'The enrolment id.' }),
|
|
142
|
+
tslib_1.__metadata("design:type", String)
|
|
143
|
+
], EnrollmentStatusRow.prototype, "id", void 0);
|
|
144
|
+
tslib_1.__decorate([
|
|
145
|
+
(0, type_graphql_1.Field)(type => enrollment_1.Enrollment, { description: 'The enrolment - for a department head its status and days only.' }),
|
|
146
|
+
tslib_1.__metadata("design:type", enrollment_1.Enrollment)
|
|
147
|
+
], EnrollmentStatusRow.prototype, "enrollment", void 0);
|
|
148
|
+
tslib_1.__decorate([
|
|
149
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who takes it.' }),
|
|
150
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
151
|
+
], EnrollmentStatusRow.prototype, "user", void 0);
|
|
152
|
+
tslib_1.__decorate([
|
|
153
|
+
(0, type_graphql_1.Field)(type => course_1.Course, { nullable: true, description: 'The course.' }),
|
|
154
|
+
tslib_1.__metadata("design:type", course_1.Course)
|
|
155
|
+
], EnrollmentStatusRow.prototype, "course", void 0);
|
|
156
|
+
tslib_1.__decorate([
|
|
157
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Their department.' }),
|
|
158
|
+
tslib_1.__metadata("design:type", String)
|
|
159
|
+
], EnrollmentStatusRow.prototype, "departmentName", void 0);
|
|
160
|
+
tslib_1.__decorate([
|
|
161
|
+
(0, type_graphql_1.Field)({ description: 'ASSIGNED, IN_PROGRESS, COMPLETED, CANCELLED, or OVERDUE for an open one past its due day.' }),
|
|
162
|
+
tslib_1.__metadata("design:type", String)
|
|
163
|
+
], EnrollmentStatusRow.prototype, "state", void 0);
|
|
164
|
+
tslib_1.__decorate([
|
|
165
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The units that count.' }),
|
|
166
|
+
tslib_1.__metadata("design:type", Number)
|
|
167
|
+
], EnrollmentStatusRow.prototype, "units", void 0);
|
|
168
|
+
tslib_1.__decorate([
|
|
169
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The units done.' }),
|
|
170
|
+
tslib_1.__metadata("design:type", Number)
|
|
171
|
+
], EnrollmentStatusRow.prototype, "unitsDone", void 0);
|
|
172
|
+
tslib_1.__decorate([
|
|
173
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'The version taken.' }),
|
|
174
|
+
tslib_1.__metadata("design:type", Number)
|
|
175
|
+
], EnrollmentStatusRow.prototype, "versionNumber", void 0);
|
|
176
|
+
exports.EnrollmentStatusRow = EnrollmentStatusRow = tslib_1.__decorate([
|
|
177
|
+
(0, type_graphql_1.ObjectType)({ description: 'One enrolment as the status reads it' })
|
|
178
|
+
], EnrollmentStatusRow);
|
|
179
|
+
let EnrollmentStatusSummary = class EnrollmentStatusSummary {
|
|
180
|
+
};
|
|
181
|
+
exports.EnrollmentStatusSummary = EnrollmentStatusSummary;
|
|
182
|
+
tslib_1.__decorate([
|
|
183
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'All of them, cancelled ones aside.' }),
|
|
184
|
+
tslib_1.__metadata("design:type", Number)
|
|
185
|
+
], EnrollmentStatusSummary.prototype, "total", void 0);
|
|
186
|
+
tslib_1.__decorate([
|
|
187
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Not started.' }),
|
|
188
|
+
tslib_1.__metadata("design:type", Number)
|
|
189
|
+
], EnrollmentStatusSummary.prototype, "assigned", void 0);
|
|
190
|
+
tslib_1.__decorate([
|
|
191
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Started.' }),
|
|
192
|
+
tslib_1.__metadata("design:type", Number)
|
|
193
|
+
], EnrollmentStatusSummary.prototype, "inProgress", void 0);
|
|
194
|
+
tslib_1.__decorate([
|
|
195
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Completed.' }),
|
|
196
|
+
tslib_1.__metadata("design:type", Number)
|
|
197
|
+
], EnrollmentStatusSummary.prototype, "completed", void 0);
|
|
198
|
+
tslib_1.__decorate([
|
|
199
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Open past their due day.' }),
|
|
200
|
+
tslib_1.__metadata("design:type", Number)
|
|
201
|
+
], EnrollmentStatusSummary.prototype, "overdue", void 0);
|
|
202
|
+
exports.EnrollmentStatusSummary = EnrollmentStatusSummary = tslib_1.__decorate([
|
|
203
|
+
(0, type_graphql_1.ObjectType)({ description: 'How many enrolments stand where' })
|
|
204
|
+
], EnrollmentStatusSummary);
|
|
205
|
+
let EnrollmentStatusList = class EnrollmentStatusList {
|
|
206
|
+
};
|
|
207
|
+
exports.EnrollmentStatusList = EnrollmentStatusList;
|
|
208
|
+
tslib_1.__decorate([
|
|
209
|
+
(0, type_graphql_1.Field)(type => [EnrollmentStatusRow], { description: 'The enrolments.' }),
|
|
210
|
+
tslib_1.__metadata("design:type", Array)
|
|
211
|
+
], EnrollmentStatusList.prototype, "items", void 0);
|
|
212
|
+
tslib_1.__decorate([
|
|
213
|
+
(0, type_graphql_1.Field)(type => EnrollmentStatusSummary, { description: 'Their counts.' }),
|
|
214
|
+
tslib_1.__metadata("design:type", EnrollmentStatusSummary)
|
|
215
|
+
], EnrollmentStatusList.prototype, "summary", void 0);
|
|
216
|
+
exports.EnrollmentStatusList = EnrollmentStatusList = tslib_1.__decorate([
|
|
217
|
+
(0, type_graphql_1.ObjectType)({ description: 'Enrolments and their counts' })
|
|
218
|
+
], EnrollmentStatusList);
|
|
219
|
+
let LearningAudienceInput = class LearningAudienceInput {
|
|
220
|
+
};
|
|
221
|
+
exports.LearningAudienceInput = LearningAudienceInput;
|
|
222
|
+
tslib_1.__decorate([
|
|
223
|
+
(0, type_graphql_1.Field)({ description: 'DOMAIN | DEPARTMENT | ROLE | USER.' }),
|
|
224
|
+
tslib_1.__metadata("design:type", String)
|
|
225
|
+
], LearningAudienceInput.prototype, "scope", void 0);
|
|
226
|
+
tslib_1.__decorate([
|
|
227
|
+
(0, type_graphql_1.Field)({ description: 'The id of the domain, department, role or user.' }),
|
|
228
|
+
tslib_1.__metadata("design:type", String)
|
|
229
|
+
], LearningAudienceInput.prototype, "targetId", void 0);
|
|
230
|
+
tslib_1.__decorate([
|
|
231
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Its name, as shown.' }),
|
|
232
|
+
tslib_1.__metadata("design:type", String)
|
|
233
|
+
], LearningAudienceInput.prototype, "targetName", void 0);
|
|
234
|
+
exports.LearningAudienceInput = LearningAudienceInput = tslib_1.__decorate([
|
|
235
|
+
(0, type_graphql_1.InputType)({ description: 'One target of an audience - the domain, a department (with those under it), a role or a person' })
|
|
236
|
+
], LearningAudienceInput);
|
|
237
|
+
let LearningEnrollmentRow = class LearningEnrollmentRow {
|
|
238
|
+
};
|
|
239
|
+
exports.LearningEnrollmentRow = LearningEnrollmentRow;
|
|
240
|
+
tslib_1.__decorate([
|
|
241
|
+
(0, type_graphql_1.Field)({ description: 'The enrolment id.' }),
|
|
242
|
+
tslib_1.__metadata("design:type", String)
|
|
243
|
+
], LearningEnrollmentRow.prototype, "id", void 0);
|
|
244
|
+
tslib_1.__decorate([
|
|
245
|
+
(0, type_graphql_1.Field)({ description: 'Who takes it.' }),
|
|
246
|
+
tslib_1.__metadata("design:type", String)
|
|
247
|
+
], LearningEnrollmentRow.prototype, "learner", void 0);
|
|
248
|
+
tslib_1.__decorate([
|
|
249
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Their department.' }),
|
|
250
|
+
tslib_1.__metadata("design:type", String)
|
|
251
|
+
], LearningEnrollmentRow.prototype, "departmentName", void 0);
|
|
252
|
+
tslib_1.__decorate([
|
|
253
|
+
(0, type_graphql_1.Field)({ description: 'The course.' }),
|
|
254
|
+
tslib_1.__metadata("design:type", String)
|
|
255
|
+
], LearningEnrollmentRow.prototype, "course", void 0);
|
|
256
|
+
tslib_1.__decorate([
|
|
257
|
+
(0, type_graphql_1.Field)({ description: 'ASSIGNED, IN_PROGRESS, COMPLETED or OVERDUE.' }),
|
|
258
|
+
tslib_1.__metadata("design:type", String)
|
|
259
|
+
], LearningEnrollmentRow.prototype, "state", void 0);
|
|
260
|
+
tslib_1.__decorate([
|
|
261
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD it is due.' }),
|
|
262
|
+
tslib_1.__metadata("design:type", String)
|
|
263
|
+
], LearningEnrollmentRow.prototype, "dueOn", void 0);
|
|
264
|
+
tslib_1.__decorate([
|
|
265
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Days to the due day - negative past it.' }),
|
|
266
|
+
tslib_1.__metadata("design:type", Number)
|
|
267
|
+
], LearningEnrollmentRow.prototype, "daysLeft", void 0);
|
|
268
|
+
tslib_1.__decorate([
|
|
269
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it was started.' }),
|
|
270
|
+
tslib_1.__metadata("design:type", Date)
|
|
271
|
+
], LearningEnrollmentRow.prototype, "startedAt", void 0);
|
|
272
|
+
tslib_1.__decorate([
|
|
273
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it was completed.' }),
|
|
274
|
+
tslib_1.__metadata("design:type", Date)
|
|
275
|
+
], LearningEnrollmentRow.prototype, "completedAt", void 0);
|
|
276
|
+
tslib_1.__decorate([
|
|
277
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Units done.' }),
|
|
278
|
+
tslib_1.__metadata("design:type", Number)
|
|
279
|
+
], LearningEnrollmentRow.prototype, "unitsDone", void 0);
|
|
280
|
+
tslib_1.__decorate([
|
|
281
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Units that count.' }),
|
|
282
|
+
tslib_1.__metadata("design:type", Number)
|
|
283
|
+
], LearningEnrollmentRow.prototype, "units", void 0);
|
|
284
|
+
exports.LearningEnrollmentRow = LearningEnrollmentRow = tslib_1.__decorate([
|
|
285
|
+
(0, type_graphql_1.ObjectType)({ description: 'An enrolment as the assistant lists it' })
|
|
286
|
+
], LearningEnrollmentRow);
|
|
287
|
+
let LearningEnrollmentList = class LearningEnrollmentList {
|
|
288
|
+
};
|
|
289
|
+
exports.LearningEnrollmentList = LearningEnrollmentList;
|
|
290
|
+
tslib_1.__decorate([
|
|
291
|
+
(0, type_graphql_1.Field)(type => [LearningEnrollmentRow], { description: 'The enrolments.' }),
|
|
292
|
+
tslib_1.__metadata("design:type", Array)
|
|
293
|
+
], LearningEnrollmentList.prototype, "items", void 0);
|
|
294
|
+
tslib_1.__decorate([
|
|
295
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'How many there are.' }),
|
|
296
|
+
tslib_1.__metadata("design:type", Number)
|
|
297
|
+
], LearningEnrollmentList.prototype, "total", void 0);
|
|
298
|
+
exports.LearningEnrollmentList = LearningEnrollmentList = tslib_1.__decorate([
|
|
299
|
+
(0, type_graphql_1.ObjectType)({ description: 'A page of enrolments as the assistant lists them' })
|
|
300
|
+
], LearningEnrollmentList);
|
|
301
|
+
let LearningContentUnit = class LearningContentUnit {
|
|
302
|
+
};
|
|
303
|
+
exports.LearningContentUnit = LearningContentUnit;
|
|
304
|
+
tslib_1.__decorate([
|
|
305
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Its place.' }),
|
|
306
|
+
tslib_1.__metadata("design:type", Number)
|
|
307
|
+
], LearningContentUnit.prototype, "seq", void 0);
|
|
308
|
+
tslib_1.__decorate([
|
|
309
|
+
(0, type_graphql_1.Field)({ description: 'VIDEO, PDF, MARKDOWN or LINK.' }),
|
|
310
|
+
tslib_1.__metadata("design:type", String)
|
|
311
|
+
], LearningContentUnit.prototype, "kind", void 0);
|
|
312
|
+
tslib_1.__decorate([
|
|
313
|
+
(0, type_graphql_1.Field)({ description: 'Its name.' }),
|
|
314
|
+
tslib_1.__metadata("design:type", String)
|
|
315
|
+
], LearningContentUnit.prototype, "name", void 0);
|
|
316
|
+
tslib_1.__decorate([
|
|
317
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The text of a MARKDOWN unit, the address of a LINK.' }),
|
|
318
|
+
tslib_1.__metadata("design:type", String)
|
|
319
|
+
], LearningContentUnit.prototype, "text", void 0);
|
|
320
|
+
exports.LearningContentUnit = LearningContentUnit = tslib_1.__decorate([
|
|
321
|
+
(0, type_graphql_1.ObjectType)({ description: 'A unit as the assistant reads it' })
|
|
322
|
+
], LearningContentUnit);
|
|
323
|
+
let LearningContent = class LearningContent {
|
|
324
|
+
};
|
|
325
|
+
exports.LearningContent = LearningContent;
|
|
326
|
+
tslib_1.__decorate([
|
|
327
|
+
(0, type_graphql_1.Field)({ description: 'The course.' }),
|
|
328
|
+
tslib_1.__metadata("design:type", String)
|
|
329
|
+
], LearningContent.prototype, "course", void 0);
|
|
330
|
+
tslib_1.__decorate([
|
|
331
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The version number.' }),
|
|
332
|
+
tslib_1.__metadata("design:type", Number)
|
|
333
|
+
], LearningContent.prototype, "version", void 0);
|
|
334
|
+
tslib_1.__decorate([
|
|
335
|
+
(0, type_graphql_1.Field)(type => [LearningContentUnit], { description: 'Its units.' }),
|
|
336
|
+
tslib_1.__metadata("design:type", Array)
|
|
337
|
+
], LearningContent.prototype, "units", void 0);
|
|
338
|
+
exports.LearningContent = LearningContent = tslib_1.__decorate([
|
|
339
|
+
(0, type_graphql_1.ObjectType)({ description: 'The units of one course version, as the assistant reads them' })
|
|
340
|
+
], LearningContent);
|
|
341
|
+
//# sourceMappingURL=enrollment-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enrollment-type.js","sourceRoot":"","sources":["../../../server/service/enrollment/enrollment-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAEhE,yDAAgD;AAEhD,6CAAyC;AACzC,uDAAkD;AAClD,6CAAyC;AACzC,mDAA8C;AAGvC,IAAM,YAAY,GAAlB,MAAM,YAAY;CASxB,CAAA;AATY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;sCAClD,wBAAU;0CAAA;AAGhB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,4BAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,yDAAyD,EAAE,CAAC;sCAC7G,4BAAY;8CAAO;AAG9B;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,wDAAwD,EAAE,CAAC;;4CAClE;uBARJ,YAAY;IADxB,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,mEAAmE,EAAE,CAAC;GACpF,YAAY,CASxB;AAGM,IAAM,cAAc,GAApB,MAAM,cAAc;CAM1B,CAAA;AANY,wCAAc;AAEzB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;;0CAC/B;AAGV;IADC,IAA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,WAAW,EAAE,YAAY,EAAE,CAAC;;gDAAY;AACL;IAAxD,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;;iDAAa;AAChC;IAApC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;;iDAAa;AAC8C;IAA9F,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qDAAqD,EAAE,CAAC;;iDAAqB;8BAJxG,mBAAmB;IAD/B,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;GACnD,mBAAmB,CAK/B;AAGM,IAAM,eAAe,GAArB,MAAM,eAAe;CAI3B,CAAA;AAJY,0CAAe;AACa;IAAtC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;;+CAAe;AACO;IAA3D,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;;gDAAgB;AACN;IAApE,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;;8CAA6B;0BAHtF,eAAe;IAD3B,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,8DAA8D,EAAE,CAAC;GAC/E,eAAe,CAI3B","sourcesContent":["import { Field, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\n\nimport { Course } from '../course/course'\nimport { CourseUnit } from '../course/course-unit'\nimport { Enrollment } from './enrollment'\nimport { UnitProgress } from './unit-progress'\n\n@ObjectType({ description: 'A unit as its learner sees it - with how far they went through it' })\nexport class LearningUnit {\n @Field(type => CourseUnit, { description: 'The unit.' })\n unit: CourseUnit\n\n @Field(type => UnitProgress, { nullable: true, description: 'How far the learner went - none before they started it.' })\n progress?: UnitProgress | null\n\n @Field({ description: 'Whether it counts toward completion - a link does not.' })\n counts: boolean\n}\n\n@ObjectType({ description: 'A choice as a learner is drawn it - never whether it is right' })\nexport class QuizChoiceView {\n @Field({ description: 'The choice id.' })\n id: string\n\n @Field({ description: 'What it says.' })\n text: string\n}\n\n@ObjectType({ description: 'A question as a learner is drawn it - its choices in the order shown, no answer' })\nexport class QuizQuestionView {\n @Field({ description: 'The question id.' })\n id: string\n\n @Field({ description: 'SINGLE, MULTIPLE or TRUE_FALSE.' })\n kind: string\n\n @Field({ description: 'What it asks.' })\n text: string\n\n @Field(type => [QuizChoiceView], { description: 'Its choices, shuffled.' })\n choices: QuizChoiceView[]\n}\n\n@ObjectType({ description: 'An attempt as a learner is drawn it' })\nexport class QuizAttemptView {\n @Field({ description: 'The attempt id - its answers are sent with it.' })\n attemptId: string\n\n @Field(type => [QuizQuestionView], { description: 'The questions drawn, shuffled.' })\n questions: QuizQuestionView[]\n}\n\n@ObjectType({ description: \"An attempt's result - the score and whether it passed; never the right answers\" })\nexport class QuizResultView {\n @Field(type => Int, { description: 'The score, out of 100.' })\n score: number\n\n @Field({ description: 'Whether it passed.' })\n passed: boolean\n\n @Field(type => Int, { nullable: true, description: 'Attempts left - no limit when empty.' })\n attemptsLeft?: number | null\n\n @Field(type => Enrollment, { description: 'The enrolment after it - completed when nothing else is missing.' })\n enrollment: Enrollment\n}\n\n@ObjectType({ description: \"A tick's result - the unit's progress and the enrolment after it\" })\nexport class LearningTickResult {\n @Field(type => Enrollment, { description: 'The enrolment.' })\n enrollment: Enrollment\n\n @Field(type => UnitProgress, { description: \"The unit's progress.\" })\n progress: UnitProgress\n}\n\n@InputType({ description: 'Which enrolments to read' })\nexport class EnrollmentStatusFilter {\n @Field({ nullable: true, description: 'A course.' })\n courseId?: string\n\n @Field({ nullable: true, description: 'Who asked - compliance.training-session, learning.direct ...' })\n sourceKind?: string\n\n @Field({ nullable: true, description: 'The record that asked - with sourceKind.' })\n sourceId?: string\n\n @Field({ nullable: true, description: 'ASSIGNED, IN_PROGRESS, COMPLETED, CANCELLED or OVERDUE.' })\n state?: string\n}\n\n@ObjectType({ description: 'One enrolment as the status reads it' })\nexport class EnrollmentStatusRow {\n @Field({ description: 'The enrolment id.' })\n id: string\n\n @Field(type => Enrollment, { description: 'The enrolment - for a department head its status and days only.' })\n enrollment: Enrollment\n\n @Field(type => User, { nullable: true, description: 'Who takes it.' })\n user?: User | null\n\n @Field(type => Course, { nullable: true, description: 'The course.' })\n course?: Course | null\n\n @Field({ nullable: true, description: 'Their department.' })\n departmentName?: string | null\n\n @Field({ description: 'ASSIGNED, IN_PROGRESS, COMPLETED, CANCELLED, or OVERDUE for an open one past its due day.' })\n state: string\n\n @Field(type => Int, { description: 'The units that count.' })\n units: number\n\n @Field(type => Int, { description: 'The units done.' })\n unitsDone: number\n\n @Field(type => Int, { nullable: true, description: 'The version taken.' })\n versionNumber?: number | null\n}\n\n@ObjectType({ description: 'How many enrolments stand where' })\nexport class EnrollmentStatusSummary {\n @Field(type => Int, { description: 'All of them, cancelled ones aside.' })\n total: number\n\n @Field(type => Int, { description: 'Not started.' })\n assigned: number\n\n @Field(type => Int, { description: 'Started.' })\n inProgress: number\n\n @Field(type => Int, { description: 'Completed.' })\n completed: number\n\n @Field(type => Int, { description: 'Open past their due day.' })\n overdue: number\n}\n\n@ObjectType({ description: 'Enrolments and their counts' })\nexport class EnrollmentStatusList {\n @Field(type => [EnrollmentStatusRow], { description: 'The enrolments.' })\n items: EnrollmentStatusRow[]\n\n @Field(type => EnrollmentStatusSummary, { description: 'Their counts.' })\n summary: EnrollmentStatusSummary\n}\n\n@InputType({ description: 'One target of an audience - the domain, a department (with those under it), a role or a person' })\nexport class LearningAudienceInput {\n @Field({ description: 'DOMAIN | DEPARTMENT | ROLE | USER.' })\n scope: string\n\n @Field({ description: 'The id of the domain, department, role or user.' })\n targetId: string\n\n @Field({ nullable: true, description: 'Its name, as shown.' })\n targetName?: string\n}\n\n@ObjectType({ description: 'An enrolment as the assistant lists it' })\nexport class LearningEnrollmentRow {\n @Field({ description: 'The enrolment id.' }) id: string\n @Field({ description: 'Who takes it.' }) learner: string\n @Field({ nullable: true, description: 'Their department.' }) departmentName?: string | null\n @Field({ description: 'The course.' }) course: string\n @Field({ description: 'ASSIGNED, IN_PROGRESS, COMPLETED or OVERDUE.' }) state: string\n @Field({ nullable: true, description: 'YYYY-MM-DD it is due.' }) dueOn?: string | null\n @Field(type => Int, { nullable: true, description: 'Days to the due day - negative past it.' }) daysLeft?: number | null\n @Field({ nullable: true, description: 'When it was started.' }) startedAt?: Date | null\n @Field({ nullable: true, description: 'When it was completed.' }) completedAt?: Date | null\n @Field(type => Int, { description: 'Units done.' }) unitsDone: number\n @Field(type => Int, { description: 'Units that count.' }) units: number\n}\n\n@ObjectType({ description: 'A page of enrolments as the assistant lists them' })\nexport class LearningEnrollmentList {\n @Field(type => [LearningEnrollmentRow], { description: 'The enrolments.' }) items: LearningEnrollmentRow[]\n @Field(type => Int, { description: 'How many there are.' }) total: number\n}\n\n@ObjectType({ description: 'A unit as the assistant reads it' })\nexport class LearningContentUnit {\n @Field(type => Int, { description: 'Its place.' }) seq: number\n @Field({ description: 'VIDEO, PDF, MARKDOWN or LINK.' }) kind: string\n @Field({ description: 'Its name.' }) name: string\n @Field({ nullable: true, description: 'The text of a MARKDOWN unit, the address of a LINK.' }) text?: string | null\n}\n\n@ObjectType({ description: 'The units of one course version, as the assistant reads them' })\nexport class LearningContent {\n @Field({ description: 'The course.' }) course: string\n @Field(type => Int, { description: 'The version number.' }) version: number\n @Field(type => [LearningContentUnit], { description: 'Its units.' }) units: LearningContentUnit[]\n}\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { Domain } from '@things-factory/shell';
|
|
3
|
+
import { Course } from '../course/course';
|
|
4
|
+
import { CourseVersion } from '../course/course-version';
|
|
5
|
+
/** Where an enrolment stands - one past its due day and not completed reads as overdue, it is not kept. */
|
|
6
|
+
export declare enum EnrollmentStatus {
|
|
7
|
+
ASSIGNED = "ASSIGNED",
|
|
8
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
9
|
+
COMPLETED = "COMPLETED",
|
|
10
|
+
CANCELLED = "CANCELLED"
|
|
11
|
+
}
|
|
12
|
+
/** The statuses of an open enrolment - one per person, course and source. */
|
|
13
|
+
export declare const OPEN_ENROLLMENT_STATUSES: EnrollmentStatus[];
|
|
14
|
+
/**
|
|
15
|
+
* 수강 (ADR-0194 decisions 5, 7, 8) - one person to take one course by a day, for whoever asked (`sourceKind` and
|
|
16
|
+
* `sourceId`: `compliance.training-session` and the session, `learning.direct` for a manager's own). The version is fixed when
|
|
17
|
+
* the person starts. Open ones are one per person, course and source (a partial unique index). A completion keeps its
|
|
18
|
+
* evidence - minutes, score, attempts, when it was confirmed, the version - and is never deleted: a wrong one is
|
|
19
|
+
* cancelled with a reason.
|
|
20
|
+
*/
|
|
21
|
+
export declare class Enrollment {
|
|
22
|
+
readonly id: string;
|
|
23
|
+
domain?: Domain;
|
|
24
|
+
domainId?: string;
|
|
25
|
+
user?: User;
|
|
26
|
+
userId?: string;
|
|
27
|
+
course?: Course;
|
|
28
|
+
courseId?: string;
|
|
29
|
+
version?: CourseVersion;
|
|
30
|
+
versionId?: string;
|
|
31
|
+
dueOn?: string;
|
|
32
|
+
sourceKind: string;
|
|
33
|
+
sourceId: string;
|
|
34
|
+
status: EnrollmentStatus;
|
|
35
|
+
startedAt?: Date;
|
|
36
|
+
learnedSeconds: number;
|
|
37
|
+
acknowledgedAt?: Date;
|
|
38
|
+
score?: number;
|
|
39
|
+
attempts: number;
|
|
40
|
+
completedAt?: Date;
|
|
41
|
+
certificateNo?: string;
|
|
42
|
+
cancelledAt?: Date;
|
|
43
|
+
cancelReason?: string;
|
|
44
|
+
todoInstanceId?: string;
|
|
45
|
+
createdAt?: Date;
|
|
46
|
+
updatedAt?: Date;
|
|
47
|
+
deletedAt?: Date;
|
|
48
|
+
creator?: User;
|
|
49
|
+
creatorId?: string;
|
|
50
|
+
updater?: User;
|
|
51
|
+
updaterId?: string;
|
|
52
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Enrollment = exports.OPEN_ENROLLMENT_STATUSES = exports.EnrollmentStatus = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const typeorm_1 = require("typeorm");
|
|
7
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
|
+
const shell_1 = require("@things-factory/shell");
|
|
9
|
+
const course_1 = require("../course/course");
|
|
10
|
+
const course_version_1 = require("../course/course-version");
|
|
11
|
+
/** Where an enrolment stands - one past its due day and not completed reads as overdue, it is not kept. */
|
|
12
|
+
var EnrollmentStatus;
|
|
13
|
+
(function (EnrollmentStatus) {
|
|
14
|
+
EnrollmentStatus["ASSIGNED"] = "ASSIGNED";
|
|
15
|
+
EnrollmentStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
16
|
+
EnrollmentStatus["COMPLETED"] = "COMPLETED";
|
|
17
|
+
EnrollmentStatus["CANCELLED"] = "CANCELLED";
|
|
18
|
+
})(EnrollmentStatus || (exports.EnrollmentStatus = EnrollmentStatus = {}));
|
|
19
|
+
(0, type_graphql_1.registerEnumType)(EnrollmentStatus, { name: 'EnrollmentStatus', description: 'ASSIGNED - not started; IN_PROGRESS - started; COMPLETED - every condition met; CANCELLED - withdrawn by who asked for it, or by a manager.' });
|
|
20
|
+
/** The statuses of an open enrolment - one per person, course and source. */
|
|
21
|
+
exports.OPEN_ENROLLMENT_STATUSES = [EnrollmentStatus.ASSIGNED, EnrollmentStatus.IN_PROGRESS];
|
|
22
|
+
/**
|
|
23
|
+
* 수강 (ADR-0194 decisions 5, 7, 8) - one person to take one course by a day, for whoever asked (`sourceKind` and
|
|
24
|
+
* `sourceId`: `compliance.training-session` and the session, `learning.direct` for a manager's own). The version is fixed when
|
|
25
|
+
* the person starts. Open ones are one per person, course and source (a partial unique index). A completion keeps its
|
|
26
|
+
* evidence - minutes, score, attempts, when it was confirmed, the version - and is never deleted: a wrong one is
|
|
27
|
+
* cancelled with a reason.
|
|
28
|
+
*/
|
|
29
|
+
let Enrollment = class Enrollment {
|
|
30
|
+
};
|
|
31
|
+
exports.Enrollment = Enrollment;
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
34
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Enrollment id.' }),
|
|
35
|
+
tslib_1.__metadata("design:type", String)
|
|
36
|
+
], Enrollment.prototype, "id", void 0);
|
|
37
|
+
tslib_1.__decorate([
|
|
38
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
39
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain.' }),
|
|
40
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
41
|
+
], Enrollment.prototype, "domain", void 0);
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
(0, typeorm_1.RelationId)((row) => row.domain),
|
|
44
|
+
tslib_1.__metadata("design:type", String)
|
|
45
|
+
], Enrollment.prototype, "domainId", void 0);
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User),
|
|
48
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who takes it.' }),
|
|
49
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
50
|
+
], Enrollment.prototype, "user", void 0);
|
|
51
|
+
tslib_1.__decorate([
|
|
52
|
+
(0, typeorm_1.RelationId)((row) => row.user),
|
|
53
|
+
tslib_1.__metadata("design:type", String)
|
|
54
|
+
], Enrollment.prototype, "userId", void 0);
|
|
55
|
+
tslib_1.__decorate([
|
|
56
|
+
(0, typeorm_1.ManyToOne)(type => course_1.Course),
|
|
57
|
+
(0, type_graphql_1.Field)(type => course_1.Course, { nullable: true, description: 'The course.' }),
|
|
58
|
+
tslib_1.__metadata("design:type", course_1.Course)
|
|
59
|
+
], Enrollment.prototype, "course", void 0);
|
|
60
|
+
tslib_1.__decorate([
|
|
61
|
+
(0, typeorm_1.RelationId)((row) => row.course),
|
|
62
|
+
tslib_1.__metadata("design:type", String)
|
|
63
|
+
], Enrollment.prototype, "courseId", void 0);
|
|
64
|
+
tslib_1.__decorate([
|
|
65
|
+
(0, typeorm_1.ManyToOne)(type => course_version_1.CourseVersion, { nullable: true }),
|
|
66
|
+
(0, type_graphql_1.Field)(type => course_version_1.CourseVersion, { nullable: true, description: 'The version taken - fixed when the person starts.' }),
|
|
67
|
+
tslib_1.__metadata("design:type", course_version_1.CourseVersion)
|
|
68
|
+
], Enrollment.prototype, "version", void 0);
|
|
69
|
+
tslib_1.__decorate([
|
|
70
|
+
(0, typeorm_1.RelationId)((row) => row.version),
|
|
71
|
+
tslib_1.__metadata("design:type", String)
|
|
72
|
+
], Enrollment.prototype, "versionId", void 0);
|
|
73
|
+
tslib_1.__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
75
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD it is to be completed by.' }),
|
|
76
|
+
tslib_1.__metadata("design:type", String)
|
|
77
|
+
], Enrollment.prototype, "dueOn", void 0);
|
|
78
|
+
tslib_1.__decorate([
|
|
79
|
+
(0, typeorm_1.Column)(),
|
|
80
|
+
(0, type_graphql_1.Field)({ description: 'The module and kind of record that asked for it - compliance.training-session, learning.direct ...' }),
|
|
81
|
+
tslib_1.__metadata("design:type", String)
|
|
82
|
+
], Enrollment.prototype, "sourceKind", void 0);
|
|
83
|
+
tslib_1.__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ default: '' }),
|
|
85
|
+
(0, type_graphql_1.Field)({ description: 'The record that asked for it - empty for a manager\'s own.' }),
|
|
86
|
+
tslib_1.__metadata("design:type", String)
|
|
87
|
+
], Enrollment.prototype, "sourceId", void 0);
|
|
88
|
+
tslib_1.__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ default: EnrollmentStatus.ASSIGNED }),
|
|
90
|
+
(0, type_graphql_1.Field)(type => EnrollmentStatus, { description: 'Where it stands.' }),
|
|
91
|
+
tslib_1.__metadata("design:type", String)
|
|
92
|
+
], Enrollment.prototype, "status", void 0);
|
|
93
|
+
tslib_1.__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
95
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When the person started.' }),
|
|
96
|
+
tslib_1.__metadata("design:type", Date)
|
|
97
|
+
], Enrollment.prototype, "startedAt", void 0);
|
|
98
|
+
tslib_1.__decorate([
|
|
99
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
100
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The seconds the server counted on its units.' }),
|
|
101
|
+
tslib_1.__metadata("design:type", Number)
|
|
102
|
+
], Enrollment.prototype, "learnedSeconds", void 0);
|
|
103
|
+
tslib_1.__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
105
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When the person confirmed the acknowledgement.' }),
|
|
106
|
+
tslib_1.__metadata("design:type", Date)
|
|
107
|
+
], Enrollment.prototype, "acknowledgedAt", void 0);
|
|
108
|
+
tslib_1.__decorate([
|
|
109
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
110
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'The best score of the quiz, out of 100.' }),
|
|
111
|
+
tslib_1.__metadata("design:type", Number)
|
|
112
|
+
], Enrollment.prototype, "score", void 0);
|
|
113
|
+
tslib_1.__decorate([
|
|
114
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
115
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'How many quiz attempts were sent.' }),
|
|
116
|
+
tslib_1.__metadata("design:type", Number)
|
|
117
|
+
], Enrollment.prototype, "attempts", void 0);
|
|
118
|
+
tslib_1.__decorate([
|
|
119
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
120
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it was completed.' }),
|
|
121
|
+
tslib_1.__metadata("design:type", Date)
|
|
122
|
+
], Enrollment.prototype, "completedAt", void 0);
|
|
123
|
+
tslib_1.__decorate([
|
|
124
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
125
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The certificate number - given at completion.' }),
|
|
126
|
+
tslib_1.__metadata("design:type", String)
|
|
127
|
+
], Enrollment.prototype, "certificateNo", void 0);
|
|
128
|
+
tslib_1.__decorate([
|
|
129
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
130
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it was cancelled.' }),
|
|
131
|
+
tslib_1.__metadata("design:type", Date)
|
|
132
|
+
], Enrollment.prototype, "cancelledAt", void 0);
|
|
133
|
+
tslib_1.__decorate([
|
|
134
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
135
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Why it was cancelled.' }),
|
|
136
|
+
tslib_1.__metadata("design:type", String)
|
|
137
|
+
], Enrollment.prototype, "cancelReason", void 0);
|
|
138
|
+
tslib_1.__decorate([
|
|
139
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
140
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The worklist to-do handed out for it.' }),
|
|
141
|
+
tslib_1.__metadata("design:type", String)
|
|
142
|
+
], Enrollment.prototype, "todoInstanceId", void 0);
|
|
143
|
+
tslib_1.__decorate([
|
|
144
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
145
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Creation timestamp.' }),
|
|
146
|
+
tslib_1.__metadata("design:type", Date)
|
|
147
|
+
], Enrollment.prototype, "createdAt", void 0);
|
|
148
|
+
tslib_1.__decorate([
|
|
149
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
150
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Last update timestamp.' }),
|
|
151
|
+
tslib_1.__metadata("design:type", Date)
|
|
152
|
+
], Enrollment.prototype, "updatedAt", void 0);
|
|
153
|
+
tslib_1.__decorate([
|
|
154
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
155
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Soft delete timestamp.' }),
|
|
156
|
+
tslib_1.__metadata("design:type", Date)
|
|
157
|
+
], Enrollment.prototype, "deletedAt", void 0);
|
|
158
|
+
tslib_1.__decorate([
|
|
159
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
160
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who made it.' }),
|
|
161
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
162
|
+
], Enrollment.prototype, "creator", void 0);
|
|
163
|
+
tslib_1.__decorate([
|
|
164
|
+
(0, typeorm_1.RelationId)((row) => row.creator),
|
|
165
|
+
tslib_1.__metadata("design:type", String)
|
|
166
|
+
], Enrollment.prototype, "creatorId", void 0);
|
|
167
|
+
tslib_1.__decorate([
|
|
168
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
169
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who changed it last.' }),
|
|
170
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
171
|
+
], Enrollment.prototype, "updater", void 0);
|
|
172
|
+
tslib_1.__decorate([
|
|
173
|
+
(0, typeorm_1.RelationId)((row) => row.updater),
|
|
174
|
+
tslib_1.__metadata("design:type", String)
|
|
175
|
+
], Enrollment.prototype, "updaterId", void 0);
|
|
176
|
+
exports.Enrollment = Enrollment = tslib_1.__decorate([
|
|
177
|
+
(0, typeorm_1.Entity)({ name: 'learning_enrollments' }),
|
|
178
|
+
(0, typeorm_1.Index)('ix_learning_enrollment_0', (row) => [row.domain, row.user, row.course, row.sourceKind, row.sourceId], {
|
|
179
|
+
unique: true,
|
|
180
|
+
where: `"deleted_at" IS NULL AND "status" IN ('ASSIGNED', 'IN_PROGRESS')`
|
|
181
|
+
}),
|
|
182
|
+
(0, typeorm_1.Index)('ix_learning_enrollment_1', (row) => [row.domain, row.course, row.status]),
|
|
183
|
+
(0, typeorm_1.Index)('ix_learning_enrollment_2', (row) => [row.domain, row.sourceKind, row.sourceId]),
|
|
184
|
+
(0, type_graphql_1.ObjectType)({ description: 'An enrolment - one person to take one course by a day, for whoever asked, with the evidence of its completion.' })
|
|
185
|
+
], Enrollment);
|
|
186
|
+
//# sourceMappingURL=enrollment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enrollment.js","sourceRoot":"","sources":["../../../server/service/enrollment/enrollment.ts"],"names":[],"mappings":";;;;AAAA,+CAA2E;AAC3E,qCAAoJ;AAEpJ,yDAAgD;AAChD,iDAA8C;AAE9C,6CAAyC;AACzC,6DAAwD;AAExD,2GAA2G;AAC3G,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,yCAAqB,CAAA;IACrB,+CAA2B,CAAA;IAC3B,2CAAuB,CAAA;IACvB,2CAAuB,CAAA;AACzB,CAAC,EALW,gBAAgB,gCAAhB,gBAAgB,QAK3B;AAED,IAAA,+BAAgB,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,WAAW,EAAE,6IAA6I,EAAE,CAAC,CAAA;AAE5N,6EAA6E;AAChE,QAAA,wBAAwB,GAAG,CAAC,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;AAEjG;;;;;;GAMG;AASI,IAAM,UAAU,GAAhB,MAAM,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AAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;sCACnE,gBAAI;2CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,GAAe,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;;6CAC3B;qBAjHP,UAAU;IARtB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;IACxC,IAAA,eAAK,EAAC,0BAA0B,EAAE,CAAC,GAAe,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE;QACxH,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,kEAAkE;KAC1E,CAAC;IACD,IAAA,eAAK,EAAC,0BAA0B,EAAE,CAAC,GAAe,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5F,IAAA,eAAK,EAAC,0BAA0B,EAAE,CAAC,GAAe,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IAClG,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,gHAAgH,EAAE,CAAC;GACjI,UAAU,CAkHtB","sourcesContent":["import { Field, ID, Int, ObjectType, registerEnumType } from 'type-graphql'\nimport { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { Course } from '../course/course'\nimport { CourseVersion } from '../course/course-version'\n\n/** Where an enrolment stands - one past its due day and not completed reads as overdue, it is not kept. */\nexport enum EnrollmentStatus {\n ASSIGNED = 'ASSIGNED',\n IN_PROGRESS = 'IN_PROGRESS',\n COMPLETED = 'COMPLETED',\n CANCELLED = 'CANCELLED'\n}\n\nregisterEnumType(EnrollmentStatus, { name: 'EnrollmentStatus', description: 'ASSIGNED - not started; IN_PROGRESS - started; COMPLETED - every condition met; CANCELLED - withdrawn by who asked for it, or by a manager.' })\n\n/** The statuses of an open enrolment - one per person, course and source. */\nexport const OPEN_ENROLLMENT_STATUSES = [EnrollmentStatus.ASSIGNED, EnrollmentStatus.IN_PROGRESS]\n\n/**\n * 수강 (ADR-0194 decisions 5, 7, 8) - one person to take one course by a day, for whoever asked (`sourceKind` and\n * `sourceId`: `compliance.training-session` and the session, `learning.direct` for a manager's own). The version is fixed when\n * the person starts. Open ones are one per person, course and source (a partial unique index). A completion keeps its\n * evidence - minutes, score, attempts, when it was confirmed, the version - and is never deleted: a wrong one is\n * cancelled with a reason.\n */\n@Entity({ name: 'learning_enrollments' })\n@Index('ix_learning_enrollment_0', (row: Enrollment) => [row.domain, row.user, row.course, row.sourceKind, row.sourceId], {\n unique: true,\n where: `\"deleted_at\" IS NULL AND \"status\" IN ('ASSIGNED', 'IN_PROGRESS')`\n})\n@Index('ix_learning_enrollment_1', (row: Enrollment) => [row.domain, row.course, row.status])\n@Index('ix_learning_enrollment_2', (row: Enrollment) => [row.domain, row.sourceKind, row.sourceId])\n@ObjectType({ description: 'An enrolment - one person to take one course by a day, for whoever asked, with the evidence of its completion.' })\nexport class Enrollment {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Enrollment id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain.' })\n domain?: Domain\n\n @RelationId((row: Enrollment) => row.domain)\n domainId?: string\n\n @ManyToOne(type => User)\n @Field(type => User, { nullable: true, description: 'Who takes it.' })\n user?: User\n\n @RelationId((row: Enrollment) => row.user)\n userId?: string\n\n @ManyToOne(type => Course)\n @Field(type => Course, { nullable: true, description: 'The course.' })\n course?: Course\n\n @RelationId((row: Enrollment) => row.course)\n courseId?: string\n\n @ManyToOne(type => CourseVersion, { nullable: true })\n @Field(type => CourseVersion, { nullable: true, description: 'The version taken - fixed when the person starts.' })\n version?: CourseVersion\n\n @RelationId((row: Enrollment) => row.version)\n versionId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'YYYY-MM-DD it is to be completed by.' })\n dueOn?: string\n\n @Column()\n @Field({ description: 'The module and kind of record that asked for it - compliance.training-session, learning.direct ...' })\n sourceKind: string\n\n @Column({ default: '' })\n @Field({ description: 'The record that asked for it - empty for a manager\\'s own.' })\n sourceId: string\n\n @Column({ default: EnrollmentStatus.ASSIGNED })\n @Field(type => EnrollmentStatus, { description: 'Where it stands.' })\n status: EnrollmentStatus\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When the person started.' })\n startedAt?: Date\n\n @Column({ type: 'int', default: 0 })\n @Field(type => Int, { description: 'The seconds the server counted on its units.' })\n learnedSeconds: number\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When the person confirmed the acknowledgement.' })\n acknowledgedAt?: Date\n\n @Column({ type: 'int', nullable: true })\n @Field(type => Int, { nullable: true, description: 'The best score of the quiz, out of 100.' })\n score?: number\n\n @Column({ type: 'int', default: 0 })\n @Field(type => Int, { description: 'How many quiz attempts were sent.' })\n attempts: number\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When it was completed.' })\n completedAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The certificate number - given at completion.' })\n certificateNo?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When it was cancelled.' })\n cancelledAt?: Date\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'Why it was cancelled.' })\n cancelReason?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The worklist to-do handed out for it.' })\n todoInstanceId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'Creation timestamp.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'Last update timestamp.' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'Soft delete timestamp.' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who made it.' })\n creator?: User\n\n @RelationId((row: Enrollment) => row.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who changed it last.' })\n updater?: User\n\n @RelationId((row: Enrollment) => row.updater)\n updaterId?: string\n}\n"]}
|