dce-crosstypes 1.0.0
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/.eslintrc.js +93 -0
- package/LICENSE +21 -0
- package/lib/Compliance/ComplianceBundle.d.ts +17 -0
- package/lib/Compliance/ComplianceBundle.js +3 -0
- package/lib/Compliance/ComplianceBundle.js.map +1 -0
- package/lib/Compliance/index.d.ts +2 -0
- package/lib/Compliance/index.js +3 -0
- package/lib/Compliance/index.js.map +1 -0
- package/lib/Engagement/ActivityEngagementDataType.d.ts +10 -0
- package/lib/Engagement/ActivityEngagementDataType.js +14 -0
- package/lib/Engagement/ActivityEngagementDataType.js.map +1 -0
- package/lib/Engagement/ActivityId.d.ts +10 -0
- package/lib/Engagement/ActivityId.js +14 -0
- package/lib/Engagement/ActivityId.js.map +1 -0
- package/lib/Engagement/AttendanceMethod.d.ts +12 -0
- package/lib/Engagement/AttendanceMethod.js +21 -0
- package/lib/Engagement/AttendanceMethod.js.map +1 -0
- package/lib/Engagement/CodeSnippet.d.ts +10 -0
- package/lib/Engagement/CodeSnippet.js +3 -0
- package/lib/Engagement/CodeSnippet.js.map +1 -0
- package/lib/Engagement/Drawing.d.ts +9 -0
- package/lib/Engagement/Drawing.js +3 -0
- package/lib/Engagement/Drawing.js.map +1 -0
- package/lib/Engagement/EngagementBundle/ActivityEngagementData.d.ts +17 -0
- package/lib/Engagement/EngagementBundle/ActivityEngagementData.js +3 -0
- package/lib/Engagement/EngagementBundle/ActivityEngagementData.js.map +1 -0
- package/lib/Engagement/EngagementBundle/EngagementPlatform.d.ts +9 -0
- package/lib/Engagement/EngagementBundle/EngagementPlatform.js +13 -0
- package/lib/Engagement/EngagementBundle/EngagementPlatform.js.map +1 -0
- package/lib/Engagement/EngagementBundle/EngagementSource.d.ts +11 -0
- package/lib/Engagement/EngagementBundle/EngagementSource.js +19 -0
- package/lib/Engagement/EngagementBundle/EngagementSource.js.map +1 -0
- package/lib/Engagement/EngagementBundle/UserEngagement.d.ts +29 -0
- package/lib/Engagement/EngagementBundle/UserEngagement.js +3 -0
- package/lib/Engagement/EngagementBundle/UserEngagement.js.map +1 -0
- package/lib/Engagement/EngagementBundle/index.d.ts +14 -0
- package/lib/Engagement/EngagementBundle/index.js +3 -0
- package/lib/Engagement/EngagementBundle/index.js.map +1 -0
- package/lib/Engagement/InferredEngagementSchedule/AverageUserEngagement.d.ts +17 -0
- package/lib/Engagement/InferredEngagementSchedule/AverageUserEngagement.js +7 -0
- package/lib/Engagement/InferredEngagementSchedule/AverageUserEngagement.js.map +1 -0
- package/lib/Engagement/InferredEngagementSchedule/InferredWeekSchedule.d.ts +18 -0
- package/lib/Engagement/InferredEngagementSchedule/InferredWeekSchedule.js +7 -0
- package/lib/Engagement/InferredEngagementSchedule/InferredWeekSchedule.js.map +1 -0
- package/lib/Engagement/InferredEngagementSchedule/index.d.ts +14 -0
- package/lib/Engagement/InferredEngagementSchedule/index.js +3 -0
- package/lib/Engagement/InferredEngagementSchedule/index.js.map +1 -0
- package/lib/Engagement/ProgrammingLanguage.d.ts +15 -0
- package/lib/Engagement/ProgrammingLanguage.js +27 -0
- package/lib/Engagement/ProgrammingLanguage.js.map +1 -0
- package/lib/Engagement/ResponsePack.d.ts +12 -0
- package/lib/Engagement/ResponsePack.js +3 -0
- package/lib/Engagement/ResponsePack.js.map +1 -0
- package/lib/Engagement/ShareoutPostPollResult.d.ts +17 -0
- package/lib/Engagement/ShareoutPostPollResult.js +3 -0
- package/lib/Engagement/ShareoutPostPollResult.js.map +1 -0
- package/lib/Engagement/index.d.ts +14 -0
- package/lib/Engagement/index.js +19 -0
- package/lib/Engagement/index.js.map +1 -0
- package/lib/index.d.ts +18 -0
- package/lib/index.js +20 -0
- package/lib/index.js.map +1 -0
- package/package.json +35 -0
- package/src/Compliance/ComplianceBundle.ts +28 -0
- package/src/Engagement/ActivityEngagementDataType.ts +11 -0
- package/src/Engagement/ActivityId.ts +11 -0
- package/src/Engagement/AttendanceMethod.ts +18 -0
- package/src/Engagement/CodeSnippet.ts +15 -0
- package/src/Engagement/Drawing.ts +12 -0
- package/src/Engagement/EngagementBundle/ActivityEngagementData.ts +26 -0
- package/src/Engagement/EngagementBundle/EngagementPlatform.ts +10 -0
- package/src/Engagement/EngagementBundle/EngagementSource.ts +16 -0
- package/src/Engagement/EngagementBundle/UserEngagement.ts +67 -0
- package/src/Engagement/EngagementBundle/index.ts +27 -0
- package/src/Engagement/InferredEngagementSchedule/AverageUserEngagement.ts +22 -0
- package/src/Engagement/InferredEngagementSchedule/InferredWeekSchedule.ts +22 -0
- package/src/Engagement/InferredEngagementSchedule/index.ts +25 -0
- package/src/Engagement/ProgrammingLanguage.ts +24 -0
- package/src/Engagement/ResponsePack.ts +18 -0
- package/src/Engagement/ShareoutPostPollResult.ts +32 -0
- package/src/index.ts +39 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import ActivityEngagementData from './EngagementBundle/ActivityEngagementData';
|
|
2
|
+
import ActivityEngagementDataType from './ActivityEngagementDataType';
|
|
3
|
+
import ActivityId from './ActivityId';
|
|
4
|
+
import AttendanceMethod from './AttendanceMethod';
|
|
5
|
+
import AverageUserEngagement from './InferredEngagementSchedule/AverageUserEngagement';
|
|
6
|
+
import EngagementBundle from './EngagementBundle';
|
|
7
|
+
import EngagementPlatform from './EngagementBundle/EngagementPlatform';
|
|
8
|
+
import EngagementSource from './EngagementBundle/EngagementSource';
|
|
9
|
+
import InferredEngagementSchedule from './InferredEngagementSchedule';
|
|
10
|
+
import ProgrammingLanguage from './ProgrammingLanguage';
|
|
11
|
+
import ResponsePack from './ResponsePack';
|
|
12
|
+
import ShareoutPostPollResult from './ShareoutPostPollResult';
|
|
13
|
+
import UserEngagement from './EngagementBundle/UserEngagement';
|
|
14
|
+
export { ActivityEngagementData, ActivityEngagementDataType, ActivityId, AttendanceMethod, AverageUserEngagement, EngagementBundle, EngagementPlatform, EngagementSource, InferredEngagementSchedule, ProgrammingLanguage, ResponsePack, ShareoutPostPollResult, UserEngagement, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ProgrammingLanguage = exports.EngagementSource = exports.EngagementPlatform = exports.AttendanceMethod = exports.ActivityId = exports.ActivityEngagementDataType = void 0;
|
|
7
|
+
const ActivityEngagementDataType_1 = __importDefault(require("./ActivityEngagementDataType"));
|
|
8
|
+
exports.ActivityEngagementDataType = ActivityEngagementDataType_1.default;
|
|
9
|
+
const ActivityId_1 = __importDefault(require("./ActivityId"));
|
|
10
|
+
exports.ActivityId = ActivityId_1.default;
|
|
11
|
+
const AttendanceMethod_1 = __importDefault(require("./AttendanceMethod"));
|
|
12
|
+
exports.AttendanceMethod = AttendanceMethod_1.default;
|
|
13
|
+
const EngagementPlatform_1 = __importDefault(require("./EngagementBundle/EngagementPlatform"));
|
|
14
|
+
exports.EngagementPlatform = EngagementPlatform_1.default;
|
|
15
|
+
const EngagementSource_1 = __importDefault(require("./EngagementBundle/EngagementSource"));
|
|
16
|
+
exports.EngagementSource = EngagementSource_1.default;
|
|
17
|
+
const ProgrammingLanguage_1 = __importDefault(require("./ProgrammingLanguage"));
|
|
18
|
+
exports.ProgrammingLanguage = ProgrammingLanguage_1.default;
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Engagement/index.ts"],"names":[],"mappings":";;;;;;AACA,8FAAsE;AAepE,qCAfK,oCAA0B,CAeL;AAd5B,8DAAsC;AAepC,qBAfK,oBAAU,CAeL;AAdZ,0EAAkD;AAehD,2BAfK,0BAAgB,CAeL;AAZlB,+FAAuE;AAerE,6BAfK,4BAAkB,CAeL;AAdpB,2FAAmE;AAejE,2BAfK,0BAAgB,CAeL;AAblB,gFAAwD;AAetD,8BAfK,6BAAmB,CAeL"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import ActivityId from './Engagement/ActivityId';
|
|
2
|
+
import ActivityEngagementData from './Engagement/EngagementBundle/ActivityEngagementData';
|
|
3
|
+
import ActivityEngagementDataType from './Engagement/ActivityEngagementDataType';
|
|
4
|
+
import AverageUserEngagement from './Engagement/InferredEngagementSchedule/AverageUserEngagement';
|
|
5
|
+
import AttendanceMethod from './Engagement/AttendanceMethod';
|
|
6
|
+
import ComplianceBundle from './Compliance/ComplianceBundle';
|
|
7
|
+
import CodeSnippet from './Engagement/CodeSnippet';
|
|
8
|
+
import Drawing from './Engagement/Drawing';
|
|
9
|
+
import EngagementBundle from './Engagement/EngagementBundle';
|
|
10
|
+
import EngagementPlatform from './Engagement/EngagementBundle/EngagementPlatform';
|
|
11
|
+
import EngagementSource from './Engagement/EngagementBundle/EngagementSource';
|
|
12
|
+
import InferredEngagementSchedule from './Engagement/InferredEngagementSchedule';
|
|
13
|
+
import InferredWeekSchedule from './Engagement/InferredEngagementSchedule/InferredWeekSchedule';
|
|
14
|
+
import ProgrammingLanguage from './Engagement/ProgrammingLanguage';
|
|
15
|
+
import ResponsePack from './Engagement/ResponsePack';
|
|
16
|
+
import ShareoutPostPollResult from './Engagement/ShareoutPostPollResult';
|
|
17
|
+
import UserEngagement from './Engagement/EngagementBundle/UserEngagement';
|
|
18
|
+
export { ActivityId, ActivityEngagementData, ActivityEngagementDataType, AverageUserEngagement, AttendanceMethod, ComplianceBundle, CodeSnippet, Drawing, EngagementBundle, EngagementPlatform, EngagementSource, InferredEngagementSchedule, InferredWeekSchedule, ProgrammingLanguage, ResponsePack, ShareoutPostPollResult, UserEngagement, };
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ProgrammingLanguage = exports.EngagementSource = exports.EngagementPlatform = exports.AttendanceMethod = exports.ActivityEngagementDataType = exports.ActivityId = void 0;
|
|
7
|
+
// import types
|
|
8
|
+
const ActivityId_1 = __importDefault(require("./Engagement/ActivityId"));
|
|
9
|
+
exports.ActivityId = ActivityId_1.default;
|
|
10
|
+
const ActivityEngagementDataType_1 = __importDefault(require("./Engagement/ActivityEngagementDataType"));
|
|
11
|
+
exports.ActivityEngagementDataType = ActivityEngagementDataType_1.default;
|
|
12
|
+
const AttendanceMethod_1 = __importDefault(require("./Engagement/AttendanceMethod"));
|
|
13
|
+
exports.AttendanceMethod = AttendanceMethod_1.default;
|
|
14
|
+
const EngagementPlatform_1 = __importDefault(require("./Engagement/EngagementBundle/EngagementPlatform"));
|
|
15
|
+
exports.EngagementPlatform = EngagementPlatform_1.default;
|
|
16
|
+
const EngagementSource_1 = __importDefault(require("./Engagement/EngagementBundle/EngagementSource"));
|
|
17
|
+
exports.EngagementSource = EngagementSource_1.default;
|
|
18
|
+
const ProgrammingLanguage_1 = __importDefault(require("./Engagement/ProgrammingLanguage"));
|
|
19
|
+
exports.ProgrammingLanguage = ProgrammingLanguage_1.default;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,eAAe;AACf,yEAAiD;AAoB/C,qBApBK,oBAAU,CAoBL;AAlBZ,yGAAiF;AAoB/E,qCApBK,oCAA0B,CAoBL;AAlB5B,qFAA6D;AAoB3D,2BApBK,0BAAgB,CAoBL;AAflB,0GAAkF;AAoBhF,6BApBK,4BAAkB,CAoBL;AAnBpB,sGAA8E;AAoB5E,2BApBK,0BAAgB,CAoBL;AAjBlB,2FAAmE;AAoBjE,8BApBK,6BAAmB,CAoBL"}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dce-crosstypes",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Types shared across Harvard EdTech projects",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"DCE",
|
|
7
|
+
"Harvard",
|
|
8
|
+
"Types"
|
|
9
|
+
],
|
|
10
|
+
"main": "./lib/index.js",
|
|
11
|
+
"types": "./lib/index.d.ts",
|
|
12
|
+
"homepage": "https://github.com/harvard-edtech/dce-crosstypes#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/harvard-edtech/dce-crosstypes/issues"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/harvard-edtech/dce-crosstypes.git"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": "Gabe Abrams <gabeabrams@gmail.com>",
|
|
22
|
+
"type": "commonjs",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc --project ./tsconfig.json",
|
|
25
|
+
"dev:sandbox": "npx tsx ./sandbox.ts"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "^24.10.1",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
|
30
|
+
"@typescript-eslint/parser": "^5.59.9",
|
|
31
|
+
"eslint": "^8.42.0",
|
|
32
|
+
"typescript": "^5.8.2",
|
|
33
|
+
"zaccl": "^4.1.4"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A compliance bundle that contains compliance records for every student in
|
|
3
|
+
* a course, organized by the start of each week (Monday).
|
|
4
|
+
*
|
|
5
|
+
* This bundle is used for federal compliance tracking to ensure that students
|
|
6
|
+
* are in compliance with federal requirements for financial aid.
|
|
7
|
+
* @author Allison Zhang
|
|
8
|
+
*/
|
|
9
|
+
type ComplianceBundle = {
|
|
10
|
+
/*----------------------------------------*/
|
|
11
|
+
/* Identifiers */
|
|
12
|
+
/*----------------------------------------*/
|
|
13
|
+
// Canvas course id
|
|
14
|
+
courseId: number,
|
|
15
|
+
/*----------------------------------------*/
|
|
16
|
+
/* Compliance Records */
|
|
17
|
+
/*----------------------------------------*/
|
|
18
|
+
// object that contains compliance records for each week
|
|
19
|
+
complianceByWeek: {
|
|
20
|
+
// The date of the monday that starts the week
|
|
21
|
+
[weekStart: string]: { // `${Month}/${Day}/${Year}` format
|
|
22
|
+
// Array of user ids who are in compliance for that week
|
|
23
|
+
userIds: number[],
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default ComplianceBundle;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum for the attendance method
|
|
3
|
+
* @author Gabe Abrams
|
|
4
|
+
*/
|
|
5
|
+
enum AttendanceMethod {
|
|
6
|
+
// Attended physically in-person
|
|
7
|
+
InPerson = 'in-person',
|
|
8
|
+
// Attended synchronously online (Zoom, for example)
|
|
9
|
+
Live = 'live',
|
|
10
|
+
// Watched a recorded version of the event after the fact
|
|
11
|
+
Async = 'async',
|
|
12
|
+
// Did not attend, but was excused and gets full credit
|
|
13
|
+
Excused = 'excused',
|
|
14
|
+
// Did not attend, was not excused
|
|
15
|
+
Absent = 'absent',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default AttendanceMethod;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Import shared types
|
|
2
|
+
import ProgrammingLanguage from './ProgrammingLanguage';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Code snippet
|
|
6
|
+
* @author Gabe Abrams
|
|
7
|
+
*/
|
|
8
|
+
type CodeSnippet = {
|
|
9
|
+
// The code itself
|
|
10
|
+
code: string,
|
|
11
|
+
// The language the code is written in
|
|
12
|
+
language: ProgrammingLanguage,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default CodeSnippet;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import ResponsePack from '../ResponsePack';
|
|
2
|
+
import ActivityEngagementDataType from '../ActivityEngagementDataType';
|
|
3
|
+
import ShareoutPostPollResult from '../ShareoutPostPollResult';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Metadata for an activity engagement, per-student. It can either contain a
|
|
7
|
+
* response pack (for Shareout engagements) or a poll result
|
|
8
|
+
* (for Poll engagements).
|
|
9
|
+
* @author Allison Zhang
|
|
10
|
+
*/
|
|
11
|
+
type ActivityEngagementData = (
|
|
12
|
+
| {
|
|
13
|
+
// Type of activity engagement data
|
|
14
|
+
type: ActivityEngagementDataType,
|
|
15
|
+
// Response pack
|
|
16
|
+
responsePack?: ResponsePack,
|
|
17
|
+
}
|
|
18
|
+
| {
|
|
19
|
+
// Type of activity engagement data
|
|
20
|
+
type: ActivityEngagementDataType.Vote,
|
|
21
|
+
// Shareout Post of the post that the user voted on
|
|
22
|
+
pollResult: ShareoutPostPollResult,
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export default ActivityEngagementData;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source of Engagements/Shareouts
|
|
3
|
+
* @author Allison Zhang
|
|
4
|
+
*/
|
|
5
|
+
enum EngagementSource {
|
|
6
|
+
// Engagement from IC activities (PairUp, Respond, Poll)
|
|
7
|
+
Activity = 'Activity',
|
|
8
|
+
// Engagement from Zoom Chat+
|
|
9
|
+
ZoomChatPlus = 'ZoomChatPlus',
|
|
10
|
+
// Attended physically in-person
|
|
11
|
+
InPerson = 'in-person',
|
|
12
|
+
// Attended synchronously online (Zoom, for example)
|
|
13
|
+
Live = 'live',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default EngagementSource;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import ActivityId from '../ActivityId';
|
|
2
|
+
import EngagementSource from './EngagementSource';
|
|
3
|
+
import ActivityEngagementData from './ActivityEngagementData';
|
|
4
|
+
import EngagementPlatform from './EngagementPlatform';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An engagement record for a user for the Universal Attendance Component.
|
|
8
|
+
* Records by video.
|
|
9
|
+
* @author Allison Zhang
|
|
10
|
+
*/
|
|
11
|
+
type UserEngagement = (
|
|
12
|
+
// General data for all engagements
|
|
13
|
+
& {
|
|
14
|
+
// ms since epoch
|
|
15
|
+
timestamp: number,
|
|
16
|
+
}
|
|
17
|
+
// Source-dependent engagement data
|
|
18
|
+
& (
|
|
19
|
+
// IC-side engagement (video engagements)
|
|
20
|
+
| (
|
|
21
|
+
& {
|
|
22
|
+
// Platform
|
|
23
|
+
platform: EngagementPlatform.IC,
|
|
24
|
+
// video seconds that the engagement corresponds to (for video engagements)
|
|
25
|
+
videoSecs?: number,
|
|
26
|
+
}
|
|
27
|
+
// Activity engagement
|
|
28
|
+
& (
|
|
29
|
+
// Engagement from IC
|
|
30
|
+
| {
|
|
31
|
+
// Source of the engagement
|
|
32
|
+
source: EngagementSource.Activity,
|
|
33
|
+
// Type of activity (PairUp, Respond, Poll)
|
|
34
|
+
activityId: ActivityId,
|
|
35
|
+
// Activity engagement data
|
|
36
|
+
activityEngagementData: ActivityEngagementData,
|
|
37
|
+
}
|
|
38
|
+
// ZoomChat+ Engagement
|
|
39
|
+
| {
|
|
40
|
+
// Source of the engagement
|
|
41
|
+
source: EngagementSource.ZoomChatPlus,
|
|
42
|
+
// TODO: fill in with data when implemented
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
)
|
|
46
|
+
// Gather-side engagement (in-person or live)
|
|
47
|
+
| (
|
|
48
|
+
& {
|
|
49
|
+
// Platform
|
|
50
|
+
platform: EngagementPlatform.Gather,
|
|
51
|
+
}
|
|
52
|
+
& (
|
|
53
|
+
// In-person engagement
|
|
54
|
+
| {
|
|
55
|
+
source: EngagementSource.InPerson,
|
|
56
|
+
groupNum?: number,
|
|
57
|
+
}
|
|
58
|
+
// Live engagement
|
|
59
|
+
| {
|
|
60
|
+
source: EngagementSource.Live,
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
export default UserEngagement;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import UserEngagement from './UserEngagement';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An engagement bundle that contains engagement records for Universal
|
|
5
|
+
* Attendance Component.
|
|
6
|
+
* @author Allison Zhang
|
|
7
|
+
*/
|
|
8
|
+
type EngagementBundle = {
|
|
9
|
+
/*----------------------------------------*/
|
|
10
|
+
/* Identifiers */
|
|
11
|
+
/*----------------------------------------*/
|
|
12
|
+
// Canvas user id
|
|
13
|
+
userId: number,
|
|
14
|
+
// Canvas course id
|
|
15
|
+
courseId: number,
|
|
16
|
+
/*----------------------------------------*/
|
|
17
|
+
/* Engagement Records */
|
|
18
|
+
/*----------------------------------------*/
|
|
19
|
+
// object that contains engagement records for each week
|
|
20
|
+
engagementByWeek: {
|
|
21
|
+
// The date of the monday that starts the week
|
|
22
|
+
// `${Month}/${Day}/${Year}` format
|
|
23
|
+
[weekStart: string]: UserEngagement[],
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default EngagementBundle;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import ActivityId from '../ActivityId';
|
|
2
|
+
import EngagementSource from '../EngagementBundle/EngagementSource';
|
|
3
|
+
import ActivityEngagementDataType from '../ActivityEngagementDataType';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* An engagement record for a user for the Universal Attendance Component.
|
|
7
|
+
* Records by video.
|
|
8
|
+
* @author Allison Zhang
|
|
9
|
+
*/
|
|
10
|
+
type AverageUserEngagement = {
|
|
11
|
+
// Activity source
|
|
12
|
+
[EngagementSource.Activity]?: {
|
|
13
|
+
[activityId in ActivityId]?: {
|
|
14
|
+
// average number of engagements
|
|
15
|
+
[engagementType in ActivityEngagementDataType]?: number
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
// TODO: determine what data to include when implemented
|
|
19
|
+
[EngagementSource.ZoomChatPlus]?: {},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default AverageUserEngagement;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import AttendanceMethod from '../AttendanceMethod';
|
|
2
|
+
import AverageUserEngagement from './AverageUserEngagement';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Information that is contained in the inferred engagement schedule for a week.
|
|
6
|
+
* @author Allison Zhang
|
|
7
|
+
*/
|
|
8
|
+
type InferredWeekSchedule = {
|
|
9
|
+
// Average user engagement for the week (IC)
|
|
10
|
+
ic?: {
|
|
11
|
+
averageUserEngagement: AverageUserEngagement,
|
|
12
|
+
},
|
|
13
|
+
// Attendance method information for the week (Gather)
|
|
14
|
+
gather?: {
|
|
15
|
+
attendanceMethodMap: {
|
|
16
|
+
[AttendanceMethod.InPerson]?: boolean,
|
|
17
|
+
[AttendanceMethod.Live]?: boolean,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default InferredWeekSchedule;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Import types
|
|
2
|
+
import InferredWeekSchedule from './InferredWeekSchedule';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A schedule with average user engagement for each week in the course. The
|
|
6
|
+
* schedule is generated based on the engagement data of the students in the
|
|
7
|
+
* course.
|
|
8
|
+
* @author Allison Zhang
|
|
9
|
+
*/
|
|
10
|
+
type InferredEngagementSchedule = {
|
|
11
|
+
/*----------------------------------------*/
|
|
12
|
+
/* Identifiers */
|
|
13
|
+
/*----------------------------------------*/
|
|
14
|
+
// Canvas course id
|
|
15
|
+
courseId: number,
|
|
16
|
+
|
|
17
|
+
// Object that contains scheduled weeks with metadata
|
|
18
|
+
// If the week is not present, then it is not considered to be part of the
|
|
19
|
+
// inferred schedule
|
|
20
|
+
scheduleByWeek: {
|
|
21
|
+
[week: string]: InferredWeekSchedule,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default InferredEngagementSchedule;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Different types of programming languages
|
|
3
|
+
* @author Gabe Abrams
|
|
4
|
+
*/
|
|
5
|
+
enum ProgrammingLanguage {
|
|
6
|
+
// Generic code with no language (just monospace, not highlighted)
|
|
7
|
+
None = 'None',
|
|
8
|
+
// Python
|
|
9
|
+
Python = 'Python',
|
|
10
|
+
// Java
|
|
11
|
+
Java = 'Java',
|
|
12
|
+
// C++
|
|
13
|
+
CPP = 'CPP',
|
|
14
|
+
// JavaScript
|
|
15
|
+
JavaScript = 'JavaScript',
|
|
16
|
+
// TypeScript
|
|
17
|
+
TypeScript = 'TypeScript',
|
|
18
|
+
// HTML
|
|
19
|
+
HTML = 'HTML',
|
|
20
|
+
// CSS
|
|
21
|
+
CSS = 'CSS',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default ProgrammingLanguage;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Import shared types
|
|
2
|
+
import Drawing from './Drawing';
|
|
3
|
+
import CodeSnippet from './CodeSnippet';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Type of a response (defines all types of media that can be included)
|
|
7
|
+
* @author Gabe Abrams
|
|
8
|
+
*/
|
|
9
|
+
type ResponsePack = {
|
|
10
|
+
// Text response
|
|
11
|
+
text?: string,
|
|
12
|
+
// Drawing:
|
|
13
|
+
drawing?: Drawing,
|
|
14
|
+
// Code snippet
|
|
15
|
+
codeSnippet?: CodeSnippet,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default ResponsePack;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Import types
|
|
2
|
+
import ZoomPollQuestionAndAnswerType from 'zaccl/lib/types/ZoomPollQuestionAndAnswerType';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The submitted choices for a poll in a shareout post
|
|
6
|
+
* @author Yuen Ler Chow
|
|
7
|
+
*/
|
|
8
|
+
type ShareoutPostPollResult = {
|
|
9
|
+
// The question number
|
|
10
|
+
[questionNumber: string]: (
|
|
11
|
+
& {
|
|
12
|
+
// The question text
|
|
13
|
+
question: string,
|
|
14
|
+
}
|
|
15
|
+
& (
|
|
16
|
+
| {
|
|
17
|
+
// The poll is a single choice poll
|
|
18
|
+
pollType: ZoomPollQuestionAndAnswerType.SingleChoice,
|
|
19
|
+
// The selected choice, undefined if no choice was selected
|
|
20
|
+
selectedChoice: string | undefined,
|
|
21
|
+
}
|
|
22
|
+
| {
|
|
23
|
+
// The poll is a multiple choice poll
|
|
24
|
+
pollType: ZoomPollQuestionAndAnswerType.MultipleChoice,
|
|
25
|
+
// The selected choices
|
|
26
|
+
selectedChoices: string[],
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default ShareoutPostPollResult;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// import types
|
|
2
|
+
import ActivityId from './Engagement/ActivityId';
|
|
3
|
+
import ActivityEngagementData from './Engagement/EngagementBundle/ActivityEngagementData';
|
|
4
|
+
import ActivityEngagementDataType from './Engagement/ActivityEngagementDataType';
|
|
5
|
+
import AverageUserEngagement from './Engagement/InferredEngagementSchedule/AverageUserEngagement';
|
|
6
|
+
import AttendanceMethod from './Engagement/AttendanceMethod';
|
|
7
|
+
import ComplianceBundle from './Compliance/ComplianceBundle';
|
|
8
|
+
import CodeSnippet from './Engagement/CodeSnippet';
|
|
9
|
+
import Drawing from './Engagement/Drawing';
|
|
10
|
+
import EngagementBundle from './Engagement/EngagementBundle';
|
|
11
|
+
import EngagementPlatform from './Engagement/EngagementBundle/EngagementPlatform';
|
|
12
|
+
import EngagementSource from './Engagement/EngagementBundle/EngagementSource';
|
|
13
|
+
import InferredEngagementSchedule from './Engagement/InferredEngagementSchedule';
|
|
14
|
+
import InferredWeekSchedule from './Engagement/InferredEngagementSchedule/InferredWeekSchedule';
|
|
15
|
+
import ProgrammingLanguage from './Engagement/ProgrammingLanguage';
|
|
16
|
+
import ResponsePack from './Engagement/ResponsePack';
|
|
17
|
+
import ShareoutPostPollResult from './Engagement/ShareoutPostPollResult';
|
|
18
|
+
import UserEngagement from './Engagement/EngagementBundle/UserEngagement';
|
|
19
|
+
|
|
20
|
+
// export types
|
|
21
|
+
export {
|
|
22
|
+
ActivityId,
|
|
23
|
+
ActivityEngagementData,
|
|
24
|
+
ActivityEngagementDataType,
|
|
25
|
+
AverageUserEngagement,
|
|
26
|
+
AttendanceMethod,
|
|
27
|
+
ComplianceBundle,
|
|
28
|
+
CodeSnippet,
|
|
29
|
+
Drawing,
|
|
30
|
+
EngagementBundle,
|
|
31
|
+
EngagementPlatform,
|
|
32
|
+
EngagementSource,
|
|
33
|
+
InferredEngagementSchedule,
|
|
34
|
+
InferredWeekSchedule,
|
|
35
|
+
ProgrammingLanguage,
|
|
36
|
+
ResponsePack,
|
|
37
|
+
ShareoutPostPollResult,
|
|
38
|
+
UserEngagement,
|
|
39
|
+
};
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"esModuleInterop": true,
|
|
5
|
+
"noImplicitAny": true,
|
|
6
|
+
"noEmitOnError": true,
|
|
7
|
+
"removeComments": false,
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"target": "es6",
|
|
11
|
+
"outDir": "./lib",
|
|
12
|
+
"rootDir": "./src"
|
|
13
|
+
},
|
|
14
|
+
"include": [
|
|
15
|
+
"./src"
|
|
16
|
+
],
|
|
17
|
+
"ts-node": {
|
|
18
|
+
"files": true
|
|
19
|
+
}
|
|
20
|
+
}
|