diff --git a/.gitignore b/.gitignore
index b271da12159..66c27ed19b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,7 +24,8 @@ hsqldb
hsqldb_test
.classpath
tokens/
+*storybook.log
scripts/awscliv2.zip
scripts/aws/install
scripts/aws/README.md
-scripts/aws/THIRD_PARTY_LICENSES
\ No newline at end of file
+scripts/aws/THIRD_PARTY_LICENSES
diff --git a/.storybook/docsTheme.ts b/.storybook/docsTheme.ts
new file mode 100644
index 00000000000..7bc832e91de
--- /dev/null
+++ b/.storybook/docsTheme.ts
@@ -0,0 +1,11 @@
+import { create } from 'storybook/theming';
+
+export default create({
+ base: 'light',
+ fontBase: '"Roboto", sans-serif',
+ brandTitle: 'WISE',
+ brandUrl: 'https://wise.berkeley.edu',
+ brandTarget: '_self',
+ colorPrimary: '#00799C',
+ colorSecondary: '#00799C'
+});
diff --git a/.storybook/main.ts b/.storybook/main.ts
new file mode 100644
index 00000000000..1517de58bc1
--- /dev/null
+++ b/.storybook/main.ts
@@ -0,0 +1,17 @@
+import type { StorybookConfig } from '@storybook/angular';
+
+const config: StorybookConfig = {
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
+ staticDirs: ['../src/stories/assets'],
+ addons: [
+ '@storybook/addon-onboarding',
+ '@chromatic-com/storybook',
+ '@storybook/addon-a11y',
+ '@storybook/addon-docs'
+ ],
+ framework: {
+ name: '@storybook/angular',
+ options: {}
+ }
+};
+export default config;
diff --git a/.storybook/manager.ts b/.storybook/manager.ts
new file mode 100644
index 00000000000..07bdb161cee
--- /dev/null
+++ b/.storybook/manager.ts
@@ -0,0 +1,6 @@
+import { addons } from 'storybook/manager-api';
+import wiseTheme from './wiseTheme';
+
+addons.setConfig({
+ theme: wiseTheme
+});
diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html
new file mode 100644
index 00000000000..05615c940d3
--- /dev/null
+++ b/.storybook/preview-head.html
@@ -0,0 +1,9 @@
+
+
+
diff --git a/.storybook/preview.ts b/.storybook/preview.ts
new file mode 100644
index 00000000000..9c1969c36ad
--- /dev/null
+++ b/.storybook/preview.ts
@@ -0,0 +1,43 @@
+import { moduleMetadata, type Preview } from '@storybook/angular';
+import { setCompodocJson } from '@storybook/addon-docs/angular';
+import docJson from '../documentation.json';
+import { MAT_TABS_CONFIG } from '@angular/material/tabs';
+import docsTheme from './docsTheme';
+
+setCompodocJson(docJson);
+
+const preview: Preview = {
+ parameters: {
+ controls: {
+ matchers: {
+ color: /(background|color)$/i,
+ date: /Date$/i
+ }
+ },
+ docs: {
+ theme: docsTheme,
+ toc: { headingSelector: 'h2, h3' }
+ },
+ options: {
+ storySort: {
+ method: 'alphabetical',
+ order: ['Design Tokens & Guidelines', ['Color', 'Typography', 'Layout'], 'Components']
+ }
+ }
+ },
+ decorators: [
+ moduleMetadata({
+ providers: [
+ {
+ provide: MAT_TABS_CONFIG,
+ useValue: {
+ animationDuration: '400ms',
+ stretchTabs: false
+ }
+ }
+ ]
+ })
+ ]
+};
+
+export default preview;
diff --git a/.storybook/tsconfig.doc.json b/.storybook/tsconfig.doc.json
new file mode 100644
index 00000000000..22e282bd5db
--- /dev/null
+++ b/.storybook/tsconfig.doc.json
@@ -0,0 +1,10 @@
+// This tsconfig is used by Compodoc to generate the documentation for the project.
+// If Compodoc is not used, this file can be deleted.
+{
+ "extends": "./tsconfig.json",
+ // Exclude all files that are not needed for documentation generation.
+ "exclude": ["../src/test.ts", "../src/**/*.spec.ts", "../src/**/*.stories.ts"],
+ // Please make sure to include all files from which Compodoc should generate documentation.
+ "include": ["../src/**/*"],
+ "files": ["./typings.d.ts"]
+}
diff --git a/.storybook/tsconfig.json b/.storybook/tsconfig.json
new file mode 100644
index 00000000000..bb7495bc29d
--- /dev/null
+++ b/.storybook/tsconfig.json
@@ -0,0 +1,14 @@
+{
+ "extends": "../src/tsconfig.app.json",
+ "compilerOptions": {
+ "types": ["node"],
+ "emitDecoratorMetadata": true,
+ "moduleResolution": "bundler",
+ "module": "preserve",
+ "allowSyntheticDefaultImports": true,
+ "resolveJsonModule": true
+ },
+ "exclude": ["../src/test.ts", "../src/**/*.spec.ts"],
+ "include": ["../src/**/*.stories.*", "./*.ts"],
+ "files": ["./typings.d.ts", "../src/polyfills.ts"]
+}
diff --git a/.storybook/typings.d.ts b/.storybook/typings.d.ts
new file mode 100644
index 00000000000..f73d61b396c
--- /dev/null
+++ b/.storybook/typings.d.ts
@@ -0,0 +1,4 @@
+declare module '*.md' {
+ const content: string;
+ export default content;
+}
diff --git a/.storybook/wiseTheme.ts b/.storybook/wiseTheme.ts
new file mode 100644
index 00000000000..e96179e6304
--- /dev/null
+++ b/.storybook/wiseTheme.ts
@@ -0,0 +1,10 @@
+import { create } from 'storybook/theming';
+
+export default create({
+ base: 'dark',
+ fontBase: '"Roboto", sans-serif',
+ brandTitle: 'WISE',
+ brandUrl: 'https://wise.berkeley.edu',
+ // brandImage: 'https://storybook.js.org/images/placeholders/350x150.png',
+ brandTarget: '_self'
+});
diff --git a/angular.json b/angular.json
index 117431c2345..aa6917e5b20 100644
--- a/angular.json
+++ b/angular.json
@@ -214,6 +214,39 @@
"**/node_modules/**"
]
}
+ },
+ "storybook": {
+ "builder": "@storybook/angular:start-storybook",
+ "options": {
+ "tsConfig": ".storybook/tsconfig.json",
+ "configDir": ".storybook",
+ "browserTarget": "wise:build",
+ "compodoc": true,
+ "compodocArgs": [
+ "-e",
+ "json",
+ "-d",
+ "."
+ ],
+ "port": 6006,
+ "styles": [ "src/style/styles.scss", "src/stories/docs.scss" ]
+ }
+ },
+ "build-storybook": {
+ "builder": "@storybook/angular:build-storybook",
+ "options": {
+ "tsConfig": ".storybook/tsconfig.json",
+ "configDir": ".storybook",
+ "browserTarget": "wise:build",
+ "compodoc": true,
+ "compodocArgs": [
+ "-e",
+ "json",
+ "-d",
+ "."
+ ],
+ "outputDir": "dist/storybook/wise"
+ }
}
},
"i18n": {
@@ -289,4 +322,4 @@
"cli": {
"analytics": false
}
-}
+}
\ No newline at end of file
diff --git a/documentation.json b/documentation.json
new file mode 100644
index 00000000000..193cf7f5537
--- /dev/null
+++ b/documentation.json
@@ -0,0 +1,487175 @@
+{
+ "pipes": [
+ {
+ "name": "FileSizePipe",
+ "id": "pipe-FileSizePipe-d5c8dcf556f68d668ac7bedb506063fcbe4ab3e98369c7ae1455626009a0ec7605e14f8eed2b881e2b8bcb3aaaf147b627d2468d61bec50f2e565d165bf21c0b",
+ "file": "src/assets/wise5/authoringTool/file-size/filesize.pipe.ts",
+ "type": "pipe",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "properties": [],
+ "methods": [
+ {
+ "name": "transform",
+ "args": [
+ {
+ "name": "bytes",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 5,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "bytes",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "standalone": false,
+ "ngname": "fileSize",
+ "sourceCode": "import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'fileSize' })\nexport class FileSizePipe implements PipeTransform {\n transform(bytes: number): string {\n if (isNaN(bytes) || bytes === 0) return '0 Bytes';\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.floor(Math.log(bytes) / Math.log(1024));\n return `${parseFloat((bytes / Math.pow(1024, i)).toFixed(2))} ${sizes[i]}`;\n }\n}\n"
+ },
+ {
+ "name": "SafeUrl",
+ "id": "pipe-SafeUrl-fc001ef2201389c7a91a4fe3404ee9879872a7aa2b6b9edffb430ad8eabeab8017e1b74cdd5be48eaf65682c7f37c3eda3f942ba54adebbb0aab4335009e6208",
+ "file": "src/assets/wise5/directives/safeUrl/safe-url.pipe.ts",
+ "type": "pipe",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "properties": [],
+ "methods": [
+ {
+ "name": "transform",
+ "args": [
+ {
+ "name": "url",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 7,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "url",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "standalone": false,
+ "ngname": "safeUrl",
+ "sourceCode": "import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@Pipe({ name: 'safeUrl' })\nexport class SafeUrl implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n transform(url: string) {\n return this.sanitizer.bypassSecurityTrustResourceUrl(url);\n }\n}\n"
+ }
+ ],
+ "interfaces": [
+ {
+ "name": "AiChatContent",
+ "id": "interface-AiChatContent-0023e00428f5e21002374efb4e9aea10437857f1df9c31685f4c04f7cb6b61ac9229c80a749e5c17aaf853b8d8f7dd0d93bd53915ff27546ce3d76215d28c273",
+ "file": "src/assets/wise5/components/aiChat/AiChatContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComponentContent } from '../../common/ComponentContent';\nimport { ComputerAvatarComponentContent } from '../../common/computer-avatar/computer-avatar-component-content';\n\nexport interface AiChatContent extends ComponentContent, ComputerAvatarComponentContent {\n model: 'gpt-3.5-turbo' | 'gpt-4';\n systemPrompt: string;\n}\n",
+ "properties": [
+ {
+ "name": "model",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "\"gpt-3.5-turbo\" | \"gpt-4\"",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "systemPrompt",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "ComponentContent",
+ "ComputerAvatarComponentContent"
+ ]
+ },
+ {
+ "name": "AssetChooserDialogData",
+ "id": "interface-AssetChooserDialogData-bc189c301dcb834f6a475c3709f9d88fee64ccde8e5eb995d45d41e5e78108a3e33c23e22d8db83f13c2615d2fce9190c21e1fc9105c7c0a54f028b78e19ca0e",
+ "file": "src/assets/wise5/authoringTool/project-asset-authoring/asset-chooser-dialog-data.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface AssetChooserDialogData {\n componentId: string;\n isPopup: boolean;\n nodeId: string;\n projectId: number;\n target: string;\n targetObject: any;\n}\n",
+ "properties": [
+ {
+ "name": "componentId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "isPopup",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "nodeId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "projectId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "target",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "targetObject",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "AudioOscillatorStudentData",
+ "id": "interface-AudioOscillatorStudentData-64bbb5cd75ee0d28ab051712ec6000aa85a8e8a64c9ccf09aeb6c9dbdc29de7d2e4bbe250bf7db55f760ad46de6a721c96261ffb135e9ada1538047a5b90ccb1",
+ "file": "src/assets/wise5/components/audioOscillator/AudioOscillatorStudentData.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface AudioOscillatorStudentData {\n amplitudesPlayed: number[];\n amplitudesPlayedSorted: number[];\n frequenciesPlayed: number[];\n frequenciesPlayedSorted: number[];\n maxAmplitudePlayed: number;\n maxFrequencyPlayed: number;\n minAmplitudePlayed: number;\n minFrequencyPlayed: number;\n numberOfAmplitudesPlayed: number;\n numberOfFrequenciesPlayed: number;\n numberOfUniqueAmplitudesPlayed: number;\n numberOfUniqueFrequenciesPlayed: number;\n submitCounter: number;\n}\n",
+ "properties": [
+ {
+ "name": "amplitudesPlayed",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "amplitudesPlayedSorted",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "frequenciesPlayed",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "frequenciesPlayedSorted",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "maxAmplitudePlayed",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "maxFrequencyPlayed",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "minAmplitudePlayed",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "minFrequencyPlayed",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9
+ },
+ {
+ "name": "numberOfAmplitudesPlayed",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10
+ },
+ {
+ "name": "numberOfFrequenciesPlayed",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11
+ },
+ {
+ "name": "numberOfUniqueAmplitudesPlayed",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12
+ },
+ {
+ "name": "numberOfUniqueFrequenciesPlayed",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13
+ },
+ {
+ "name": "submitCounter",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "AuthorBranchParams",
+ "id": "interface-AuthorBranchParams-7ffec97c3103e38f0a597d6cd3a9f7d3e3ca8b7d593e5e6918e154681f750c3767335d71572099d44aa56898fb1ca8e8b647b612d9b9efbefc4a880fa4996149",
+ "file": "src/assets/wise5/common/AuthorBranchParams.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface AuthorBranchParams {\n branchStepId: string;\n componentId?: string;\n criteria: string;\n mergeStepId: string;\n nodeId?: string;\n pathCount: number;\n paths?: string[];\n}\n",
+ "properties": [
+ {
+ "name": "branchStepId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "componentId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "criteria",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "mergeStepId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "nodeId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "pathCount",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "paths",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string[]",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 8
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "BranchCriteria",
+ "id": "interface-BranchCriteria-471153844557429ebcf68888058d3e18ac94713b6b999eae07c3400327e58f8733783ee61ab294be6a1b3bf600da76941408ce824ed64916e8d21021c134a2ea",
+ "file": "src/app/domain/branchCriteria.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export const CHOICE_CHOSEN_VALUE = 'choiceChosen';\nexport const RANDOM_VALUE = 'random';\nexport const SCORE_VALUE = 'score';\nexport const WORKGROUP_ID_VALUE = 'workgroupId';\n\nexport interface BranchCriteria {\n text: string;\n value: string;\n}\n\nexport const BRANCH_CRITERIA: BranchCriteria[] = [\n {\n text: $localize`Workgroup ID`,\n value: WORKGROUP_ID_VALUE\n },\n {\n text: $localize`Score`,\n value: SCORE_VALUE\n },\n {\n text: $localize`Choice Chosen`,\n value: CHOICE_CHOSEN_VALUE\n },\n {\n text: $localize`Random`,\n value: RANDOM_VALUE\n }\n];\n",
+ "properties": [
+ {
+ "name": "text",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "value",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "Color",
+ "id": "interface-Color-e051bb891c64cb7e315cbe2b98bb59bb22d7a7275815b783bc8ceec7b4d9021a1b2b64246e9ffb55531842692af7bcaa4210d20f3216e4f59402391a7b89a490",
+ "file": "src/stories/chips/chips-input/chips-input.component.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { COMMA, ENTER } from '@angular/cdk/keycodes';\nimport { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';\nimport { MatChipEditedEvent, MatChipInputEvent, MatChipsModule } from '@angular/material/chips';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\n\nexport interface Color {\n name: string;\n}\n\n@Component({\n selector: 'chips-input',\n templateUrl: 'chips-input.component.html',\n imports: [MatFormFieldModule, MatChipsModule, MatIconModule],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ChipsInputComponent {\n readonly addOnBlur = true;\n readonly separatorKeysCodes = [ENTER, COMMA] as const;\n readonly colors = signal([{ name: 'Blue' }, { name: 'Red' }, { name: 'Green' }]);\n readonly announcer = inject(LiveAnnouncer);\n\n add(event: MatChipInputEvent): void {\n const value = (event.value || '').trim();\n if (value) {\n this.colors.update((colors) => [...colors, { name: value }]);\n }\n event.chipInput!.clear();\n }\n\n remove(color: Color): void {\n this.colors.update((colors) => {\n const index = colors.indexOf(color);\n if (index < 0) {\n return colors;\n }\n colors.splice(index, 1);\n this.announcer.announce(`Removed ${color.name}`);\n return [...colors];\n });\n }\n\n edit(color: Color, event: MatChipEditedEvent) {\n const value = event.value.trim();\n if (!value) {\n this.remove(color);\n return;\n }\n this.colors.update((colors) => {\n const index = colors.indexOf(color);\n if (index >= 0) {\n colors[index].name = value;\n return [...colors];\n }\n return colors;\n });\n }\n}\n",
+ "properties": [
+ {
+ "name": "name",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "CompletionCounter",
+ "id": "interface-CompletionCounter-7aa78242d203db42f3544aa21c22f61afb3d79c84b1191e656235101e0465c88cc385a90a13ce9c41be742ced4dd1341ec2dc886ba0bec08c21c2105aeb38393",
+ "file": "src/assets/wise5/common/CompletionCounter.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface CompletionCounter {\n numCompleted: number;\n numTotal: number;\n}\n",
+ "properties": [
+ {
+ "name": "numCompleted",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "numTotal",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "CompletionCriteria",
+ "id": "interface-CompletionCriteria-95ddc6433ae80513adaed4b5ffae138c4a6ee3e3d25c987e960f47e73c72b9f62f38e142c1c996b5b0b2e8bc2dbd2755a43bae81b3f4ad3627ae62fdc322aac6",
+ "file": "src/assets/wise5/components/openResponse/openResponseCompletionCriteriaService.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { Injectable } from '@angular/core';\n\nexport interface CompletionCriteria {\n inOrder: boolean;\n criteria: CompletionCriterion[];\n}\n\ninterface CompletionCriterion {\n name: string;\n nodeId: string;\n componentId: string;\n}\n\n@Injectable()\nexport class OpenResponseCompletionCriteriaService {\n isSatisfied(studentData: any, completionCriteria: CompletionCriteria): boolean {\n if (completionCriteria.inOrder) {\n return this.isInOrderCompletionCriteriaSatisfied(studentData, completionCriteria);\n }\n return true;\n }\n\n private isInOrderCompletionCriteriaSatisfied(\n studentData: any,\n completionCriteria: CompletionCriteria\n ): boolean {\n let result = true;\n let tempTimestamp = 0;\n for (const completionCriterion of completionCriteria.criteria) {\n const functionName = completionCriterion.name;\n if (functionName == 'isSubmitted') {\n const tempComponentState = this.getComponentStateSubmittedAfter(\n studentData,\n completionCriterion.nodeId,\n completionCriterion.componentId,\n tempTimestamp\n );\n if (tempComponentState == null) {\n return false;\n } else {\n tempTimestamp = tempComponentState.serverSaveTime;\n }\n } else if (functionName == 'isSaved') {\n const tempComponentState = this.getComponentStateSavedAfter(\n studentData,\n completionCriterion.nodeId,\n completionCriterion.componentId,\n tempTimestamp\n );\n if (tempComponentState == null) {\n return false;\n } else {\n tempTimestamp = tempComponentState.serverSaveTime;\n }\n } else if (functionName == 'isVisited') {\n const tempEvent = this.getVisitEventAfter(\n studentData,\n completionCriterion.nodeId,\n tempTimestamp\n );\n if (tempEvent == null) {\n return false;\n } else {\n tempTimestamp = tempEvent.serverSaveTime;\n }\n }\n }\n return result;\n }\n\n private getComponentStateSubmittedAfter(\n studentData: any,\n nodeId: string,\n componentId: string,\n timestamp: number\n ): any {\n for (const componentState of studentData.componentStates) {\n if (\n componentState.nodeId === nodeId &&\n componentState.componentId === componentId &&\n componentState.serverSaveTime > timestamp &&\n componentState.isSubmit\n ) {\n return componentState;\n }\n }\n return null;\n }\n\n private getComponentStateSavedAfter(\n studentData: any,\n nodeId: string,\n componentId: string,\n timestamp: number\n ): any {\n for (const componentState of studentData.componentStates) {\n if (\n componentState.nodeId === nodeId &&\n componentState.componentId === componentId &&\n componentState.serverSaveTime > timestamp\n ) {\n return componentState;\n }\n }\n return null;\n }\n\n private getVisitEventAfter(studentData: any, nodeId: string, timestamp: number): any {\n for (const tempEvent of studentData.events) {\n if (\n tempEvent.nodeId === nodeId &&\n tempEvent.serverSaveTime > timestamp &&\n tempEvent.event === 'nodeEntered'\n ) {\n return tempEvent;\n }\n }\n return null;\n }\n}\n",
+ "properties": [
+ {
+ "name": "criteria",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "CompletionCriterion[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "inOrder",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "CompletionCriterion",
+ "id": "interface-CompletionCriterion-95ddc6433ae80513adaed4b5ffae138c4a6ee3e3d25c987e960f47e73c72b9f62f38e142c1c996b5b0b2e8bc2dbd2755a43bae81b3f4ad3627ae62fdc322aac6",
+ "file": "src/assets/wise5/components/openResponse/openResponseCompletionCriteriaService.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { Injectable } from '@angular/core';\n\nexport interface CompletionCriteria {\n inOrder: boolean;\n criteria: CompletionCriterion[];\n}\n\ninterface CompletionCriterion {\n name: string;\n nodeId: string;\n componentId: string;\n}\n\n@Injectable()\nexport class OpenResponseCompletionCriteriaService {\n isSatisfied(studentData: any, completionCriteria: CompletionCriteria): boolean {\n if (completionCriteria.inOrder) {\n return this.isInOrderCompletionCriteriaSatisfied(studentData, completionCriteria);\n }\n return true;\n }\n\n private isInOrderCompletionCriteriaSatisfied(\n studentData: any,\n completionCriteria: CompletionCriteria\n ): boolean {\n let result = true;\n let tempTimestamp = 0;\n for (const completionCriterion of completionCriteria.criteria) {\n const functionName = completionCriterion.name;\n if (functionName == 'isSubmitted') {\n const tempComponentState = this.getComponentStateSubmittedAfter(\n studentData,\n completionCriterion.nodeId,\n completionCriterion.componentId,\n tempTimestamp\n );\n if (tempComponentState == null) {\n return false;\n } else {\n tempTimestamp = tempComponentState.serverSaveTime;\n }\n } else if (functionName == 'isSaved') {\n const tempComponentState = this.getComponentStateSavedAfter(\n studentData,\n completionCriterion.nodeId,\n completionCriterion.componentId,\n tempTimestamp\n );\n if (tempComponentState == null) {\n return false;\n } else {\n tempTimestamp = tempComponentState.serverSaveTime;\n }\n } else if (functionName == 'isVisited') {\n const tempEvent = this.getVisitEventAfter(\n studentData,\n completionCriterion.nodeId,\n tempTimestamp\n );\n if (tempEvent == null) {\n return false;\n } else {\n tempTimestamp = tempEvent.serverSaveTime;\n }\n }\n }\n return result;\n }\n\n private getComponentStateSubmittedAfter(\n studentData: any,\n nodeId: string,\n componentId: string,\n timestamp: number\n ): any {\n for (const componentState of studentData.componentStates) {\n if (\n componentState.nodeId === nodeId &&\n componentState.componentId === componentId &&\n componentState.serverSaveTime > timestamp &&\n componentState.isSubmit\n ) {\n return componentState;\n }\n }\n return null;\n }\n\n private getComponentStateSavedAfter(\n studentData: any,\n nodeId: string,\n componentId: string,\n timestamp: number\n ): any {\n for (const componentState of studentData.componentStates) {\n if (\n componentState.nodeId === nodeId &&\n componentState.componentId === componentId &&\n componentState.serverSaveTime > timestamp\n ) {\n return componentState;\n }\n }\n return null;\n }\n\n private getVisitEventAfter(studentData: any, nodeId: string, timestamp: number): any {\n for (const tempEvent of studentData.events) {\n if (\n tempEvent.nodeId === nodeId &&\n tempEvent.serverSaveTime > timestamp &&\n tempEvent.event === 'nodeEntered'\n ) {\n return tempEvent;\n }\n }\n return null;\n }\n}\n",
+ "properties": [
+ {
+ "name": "componentId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11
+ },
+ {
+ "name": "name",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9
+ },
+ {
+ "name": "nodeId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "ComponentContent",
+ "id": "interface-ComponentContent-f3853b7fdfa8bf9c916899db687932fba3110b6b5007cc7e949c5b4b695e2745fd30b8088a2670dabb44ed204851941f86e86e73640d0b84730a33812d431395",
+ "file": "src/assets/wise5/common/ComponentContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { CRaterRubric } from '../components/common/cRater/CRaterRubric';\nimport { QuestionBank } from '../components/peerChat/peer-chat-question-bank/QuestionBank';\nimport { DynamicPrompt } from '../directives/dynamic-prompt/DynamicPrompt';\n\nexport interface ComponentContent {\n id: string;\n connectedComponents?: any[];\n constraints?: any[];\n cRaterRubric?: CRaterRubric;\n dynamicPrompt?: DynamicPrompt;\n excludeFromTotalScore?: boolean;\n maxScore?: number;\n maxSubmitCount?: number;\n prompt?: string;\n questionBank?: QuestionBank;\n rubric?: string;\n showSaveButton?: boolean;\n showSubmitButton?: boolean;\n type: string;\n}\n\nexport function hasConnectedComponent(\n content: ComponentContent,\n connectedComponentType: 'importWork' | 'showWork'\n): boolean {\n return (\n content.connectedComponents != null &&\n content.connectedComponents.some((c) => c.type === connectedComponentType)\n );\n}\n",
+ "properties": [
+ {
+ "name": "connectedComponents",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "constraints",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "cRaterRubric",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "CRaterRubric",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 9
+ },
+ {
+ "name": "dynamicPrompt",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "DynamicPrompt",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 10
+ },
+ {
+ "name": "excludeFromTotalScore",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 11
+ },
+ {
+ "name": "id",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "maxScore",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 12
+ },
+ {
+ "name": "maxSubmitCount",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 13
+ },
+ {
+ "name": "prompt",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 14
+ },
+ {
+ "name": "questionBank",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "QuestionBank",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 15
+ },
+ {
+ "name": "rubric",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 16
+ },
+ {
+ "name": "showSaveButton",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 17
+ },
+ {
+ "name": "showSubmitButton",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 18
+ },
+ {
+ "name": "type",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 19
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "ComponentDataExportParams",
+ "id": "interface-ComponentDataExportParams-508f44bf03c5933e06e14fa213abdc2733bf6bc93b492c3c68ccfc90df803497db5e070e6d99a690de547ca987c94ff3f1e78eb12055ecb34831fdf6450d3e9a",
+ "file": "src/assets/wise5/classroomMonitor/dataExport/ComponentDataExportParams.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface ComponentDataExportParams {\n canViewStudentNames: boolean;\n includeOnlySubmits: boolean;\n includeStudentNames: boolean;\n workSelectionType: string;\n}\n",
+ "properties": [
+ {
+ "name": "canViewStudentNames",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "includeOnlySubmits",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "includeStudentNames",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "workSelectionType",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "ComponentStateRequest",
+ "id": "interface-ComponentStateRequest-1f82c5f8ebdfbc3a6ca126203abc2ef21143878d63a9ef99b2b867c4dc379980971755a650771b961afcd875a15134eff736740cce78ad4654500664aca32fc5",
+ "file": "src/assets/wise5/components/ComponentStateRequest.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface ComponentStateRequest {\n nodeId: string;\n componentId: string;\n isSubmit: boolean;\n}\n",
+ "properties": [
+ {
+ "name": "componentId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "isSubmit",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "nodeId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "ComponentStateWrapper",
+ "id": "interface-ComponentStateWrapper-d57864071748d8f2dfc750b23d07c05d659e7032c8737868e0b07a7e3802a5d8f417d37ddcefacf9e68bbb087a37bd4f7ba14f0ab65ea1cbac2c75d2b3daf34b",
+ "file": "src/assets/wise5/components/ComponentStateWrapper.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface ComponentStateWrapper {\n nodeId: string;\n componentId: string;\n componentStatePromise: Promise;\n}\n",
+ "properties": [
+ {
+ "name": "componentId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "componentStatePromise",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Promise",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "nodeId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "ComputerAvatarComponentContent",
+ "id": "interface-ComputerAvatarComponentContent-a9ff2be159fee3bfd3361aaa548e354a85247af59ea7c4c7f02254f505cabb270b32c4c1fee0ec9bb21aead6342ac6e37b66003d333b026074f55a4d3ac6d7b3",
+ "file": "src/assets/wise5/common/computer-avatar/computer-avatar-component-content.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComputerAvatarSettings } from './ComputerAvatarSettings';\n\nexport interface ComputerAvatarComponentContent {\n computerAvatarSettings: ComputerAvatarSettings;\n isComputerAvatarEnabled: boolean;\n}\n",
+ "properties": [
+ {
+ "name": "computerAvatarSettings",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "ComputerAvatarSettings",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "isComputerAvatarEnabled",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "ConceptMapContent",
+ "id": "interface-ConceptMapContent-8a7beb0b24b8cfef6fc60edf39898d0599fafb9f36ef05dd24dbab7811c04a284110a57efedef1911e18e542d1d398f1a77504a599d7941a58f458f41a8d5bfc",
+ "file": "src/assets/wise5/components/conceptMap/ConceptMapContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComponentContent } from '../../common/ComponentContent';\n\nexport interface ConceptMapContent extends ComponentContent {\n customRuleEvaluator: any;\n links: any[];\n nodes: any[];\n rules?: any[];\n showAutoFeedback: boolean;\n showAutoScore: boolean;\n}\n",
+ "properties": [
+ {
+ "name": "customRuleEvaluator",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "links",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "nodes",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "rules",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "showAutoFeedback",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "showAutoScore",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "ComponentContent"
+ ]
+ },
+ {
+ "name": "ConstraintEvaluationResult",
+ "id": "interface-ConstraintEvaluationResult-973ef7aae02a54ea3217f8a47a9a631d91d7d7497f79e9682329a2707ecd8978523d64d605ef9935f7cb80fec6452b34ff518cc3a6a70f43aa5523934b4cfa50",
+ "file": "src/assets/wise5/common/constraint/ConstraintEvaluationResult.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface ConstraintEvaluationResult {\n isVisible: boolean;\n isVisitable: boolean;\n}\n",
+ "properties": [
+ {
+ "name": "isVisible",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "isVisitable",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "ConstraintStrategy",
+ "id": "interface-ConstraintStrategy-6b0e2c51061508231762ef84255679ee6fba6044ecf41d6ac8cc2ae5983146a379223dabb5cf0fcac6015501e9746d4d824806635f9a415c75ec42b3b9c175a4",
+ "file": "src/assets/wise5/common/constraint/strategies/ConstraintStrategy.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { EvaluateConstraintContext } from '../EvaluateConstraintContext';\n\nexport interface ConstraintStrategy {\n evaluate(criteria: any): boolean;\n setContext(context: EvaluateConstraintContext): void;\n}\n",
+ "properties": [],
+ "indexSignatures": [],
+ "kind": 174,
+ "methods": [
+ {
+ "name": "evaluate",
+ "args": [
+ {
+ "name": "criteria",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 4,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "criteria",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setContext",
+ "args": [
+ {
+ "name": "context",
+ "type": "EvaluateConstraintContext",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 5,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "context",
+ "type": "EvaluateConstraintContext",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "extends": []
+ },
+ {
+ "name": "DataExportStrategy",
+ "id": "interface-DataExportStrategy-e608a7aa01a863ce57f966c887b3db73df71981f1e0206b70ee15f608ff3da6cfd367c609fa387d862a93f8f971e540954314d5f8dbcd5f3a30d724309571a46",
+ "file": "src/assets/wise5/classroomMonitor/dataExport/strategies/DataExportStrategy.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { DataExportContext } from '../DataExportContext';\n\nexport interface DataExportStrategy {\n setDataExportContext(context: DataExportContext);\n export();\n}\n",
+ "properties": [],
+ "indexSignatures": [],
+ "kind": 174,
+ "methods": [
+ {
+ "name": "export",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 5,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "setDataExportContext",
+ "args": [
+ {
+ "name": "context",
+ "type": "DataExportContext",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 4,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "context",
+ "type": "DataExportContext",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "extends": []
+ },
+ {
+ "name": "DialogData",
+ "id": "interface-DialogData-e4e5c378fa3ac9d5432a68a1c9c4dc5d56eb71b4df8d6037e078301753d76c6fca80aaa0134049c0c10fabd0d8c4acf16ff373046a58f430ebfd672d1ac656a6",
+ "file": "src/app/domain/dialogData.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface DialogData {\n content: string;\n scroll: boolean;\n title: string;\n}\n",
+ "properties": [
+ {
+ "name": "content",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "scroll",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "title",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "DialogData",
+ "id": "interface-DialogData-2003e6cb5b8efa69ee21764c034294ffec6faeda7c1700526dbf2196cb80f0c30b40d8887726c113ad5f7193ebfad3ab7c0cb384ee878e718c934cdb88dad491-1",
+ "file": "src/stories/dialog/dialog-overview/dialog-overview.component.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ChangeDetectionStrategy, Component, inject, model, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport {\n MAT_DIALOG_DATA,\n MatDialog,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogRef,\n MatDialogTitle\n} from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\n\nexport interface DialogData {\n animal: string;\n name: string;\n}\n\n@Component({\n imports: [FormsModule, MatButtonModule, MatFormFieldModule, MatInputModule, MatSelectModule],\n selector: 'dialog-overview',\n styleUrls: ['./dialog-overview.component.scss'],\n templateUrl: './dialog-overview.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DialogOverviewComponent {\n readonly animal = signal('');\n readonly dialog = inject(MatDialog);\n protected dialogWidth: string = 'default';\n readonly name = model('');\n protected widths = [\n { value: 'default', label: 'Default' },\n { value: 'dialog-sm', label: 'Small' },\n { value: 'dialog-md', label: 'Medium' },\n { value: 'dialog-lg', label: 'Large' }\n ];\n\n openDialog(): void {\n const dialogRef = this.dialog.open(DialogOverviewDialog, {\n data: { name: this.name(), animal: this.animal() },\n panelClass: this.dialogWidth === 'default' ? '' : this.dialogWidth\n });\n\n dialogRef.afterClosed().subscribe((result) => {\n console.log('The dialog was closed');\n if (result !== undefined) {\n this.animal.set(result);\n }\n });\n }\n}\n\n@Component({\n imports: [\n MatFormFieldModule,\n MatInputModule,\n FormsModule,\n MatButtonModule,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n MatDialogClose\n ],\n selector: 'dialog-overview-dialog',\n templateUrl: './dialog-overview-dialog.html'\n})\nexport class DialogOverviewDialog {\n readonly dialogRef = inject(MatDialogRef);\n readonly data = inject(MAT_DIALOG_DATA);\n readonly animal = model(this.data.animal);\n\n cancel(): void {\n this.dialogRef.close();\n }\n}\n",
+ "properties": [
+ {
+ "name": "animal",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 18
+ },
+ {
+ "name": "name",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 19
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [],
+ "isDuplicate": true,
+ "duplicateId": 1,
+ "duplicateName": "DialogData-1"
+ },
+ {
+ "name": "DialogGuidanceContent",
+ "id": "interface-DialogGuidanceContent-a819301287fddb62111d7339f5f199cf62c5bc808a2eaa17f1f10d8143eda963aaab5d5e0205b0a287e8159e59591bebab5eff6cd600ed92c78c9197930a9686",
+ "file": "src/assets/wise5/components/dialogGuidance/DialogGuidanceContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComponentContent } from '../../common/ComponentContent';\nimport { ComputerAvatarComponentContent } from '../../common/computer-avatar/computer-avatar-component-content';\nimport { FeedbackRule } from '../common/feedbackRule/FeedbackRule';\n\nexport interface DialogGuidanceContent extends ComponentContent, ComputerAvatarComponentContent {\n feedbackRules: FeedbackRule[];\n itemId: string;\n version?: number;\n}\n",
+ "properties": [
+ {
+ "name": "feedbackRules",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "FeedbackRule[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "itemId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "version",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 8
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "ComponentContent",
+ "ComputerAvatarComponentContent"
+ ]
+ },
+ {
+ "name": "EmbeddedContent",
+ "id": "interface-EmbeddedContent-5c194b5ea36c3d4f47b1dcaa937c994dba43d796bafe0276649bd7a996acb9e079803850413b33781c3049b44a320eae66bd73293f1db926ed91e1c41f1ac89e",
+ "file": "src/assets/wise5/components/embedded/EmbeddedContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComponentContent } from '../../common/ComponentContent';\n\nexport interface EmbeddedContent extends ComponentContent {\n parameters?: any;\n url: string;\n}\n",
+ "properties": [
+ {
+ "name": "parameters",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "url",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "ComponentContent"
+ ]
+ },
+ {
+ "name": "ExpandEvent",
+ "id": "interface-ExpandEvent-0752849de8768d01a77f863be118074b43c5bde5e6d3bcd1279af5d00af948c1ec632c149e82cdd466a4d944de8a2800e79a6b829de4490638fdf9bb2c7d65b0",
+ "file": "src/assets/wise5/authoringTool/domain/expand-event.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface ExpandEvent {\n expanded: boolean;\n id: string;\n}\n",
+ "properties": [
+ {
+ "name": "expanded",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "id",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "GoogleUser",
+ "id": "interface-GoogleUser-8087b2072f73200ef7968d653dbc8a093ee75252e85efd237b4b01578081451c83942d1f22f409973e9e19a1b6a38f34af627b5b7f611d7ebb03842f416695d5",
+ "file": "src/app/modules/google-sign-in/GoogleUser.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface GoogleUser {\n email: string;\n name: string;\n sub: string;\n}\n",
+ "properties": [
+ {
+ "name": "email",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "name",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "sub",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "GraphContent",
+ "id": "interface-GraphContent-481a9cb0e3f5a197a46b231a6727b821acb2ae478fc76411292be032dc81f4757ad3558410ac5dc2e857324e09806c4006c3edc0c0f686544dfcfecb344be317",
+ "file": "src/assets/wise5/components/graph/GraphContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComponentContent } from '../../common/ComponentContent';\n\nexport interface GraphContent extends ComponentContent {\n backgroundImage?: string;\n hideTrialSelect: boolean;\n highlightXRangeFromZero: boolean;\n saveMouseOverPoints: boolean;\n showMouseXPlotLine: boolean;\n showMouseYPlotLine: boolean;\n subtitle: string;\n useCustomLegend: boolean;\n xAxis: any;\n yAxis: any;\n}\n",
+ "properties": [
+ {
+ "name": "backgroundImage",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "hideTrialSelect",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "highlightXRangeFromZero",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "saveMouseOverPoints",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "showMouseXPlotLine",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "showMouseYPlotLine",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9
+ },
+ {
+ "name": "subtitle",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10
+ },
+ {
+ "name": "useCustomLegend",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11
+ },
+ {
+ "name": "xAxis",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12
+ },
+ {
+ "name": "yAxis",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "ComponentContent"
+ ]
+ },
+ {
+ "name": "I18NReplaceKey",
+ "id": "interface-I18NReplaceKey-2b1ff7660544b5c35ab95a60cc1338d30e1087dc17a2a7584dc225336be2d86190836b10ea18140f28620d71b3c82f474b3cfa09285a55cfa3369c686af9e4f6",
+ "file": "src/assets/wise5/services/copyTranslationsService.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { EditTranslationsService } from './editProjectTranslationsService';\nimport { Node } from '../common/Node';\nimport { Observable, forkJoin } from 'rxjs';\nimport { generateRandomKey } from '../common/string/string';\nimport { ComponentContent } from '../common/ComponentContent';\n\ninterface I18NReplaceKey {\n new: string;\n original: string;\n}\n\n@Injectable()\nexport class CopyTranslationsService extends EditTranslationsService {\n tryCopyNodes(nodes: Node[]): void {\n if (this.projectService.getLocale().hasTranslations()) {\n this.copyNodes(nodes);\n }\n }\n\n private async copyNodes(nodes: Node[]): Promise {\n const i18nKeys = nodes.flatMap((node) =>\n node.components.flatMap((component) => this.getI18NKeys(component))\n );\n forkJoin(await this.getSaveTranslationRequests(i18nKeys)).subscribe();\n this.projectService.saveProject();\n }\n\n private async getSaveTranslationRequests(\n i18nKeys: I18NReplaceKey[]\n ): Promise[]> {\n const saveTranslationRequests: Observable[] = [];\n (await this.fetchAllTranslations()).forEach((translations, language) => {\n i18nKeys.forEach((i18nKey) => (translations[i18nKey.new] = translations[i18nKey.original]));\n saveTranslationRequests.push(this.getSaveTranslationRequest(translations, language));\n });\n return saveTranslationRequests;\n }\n\n tryCopyComponents(node: Node, components: ComponentContent[]): void {\n if (this.projectService.getLocale().hasTranslations()) {\n this.copyComponents(\n node,\n components.map((c) => c.id)\n );\n }\n }\n\n private async copyComponents(node: Node, componentIds: string[]): Promise {\n const i18nKeys = node.components\n .filter((component) => componentIds.includes(component.id))\n .flatMap((component) => this.getI18NKeys(component));\n forkJoin(await this.getSaveTranslationRequests(i18nKeys)).subscribe();\n this.projectService.saveProject();\n }\n\n protected getI18NKey(componentElement: object, key: string): I18NReplaceKey {\n const originalI18NKey = componentElement[key].id;\n const newI18NKey = generateRandomKey(30);\n componentElement[key].id = newI18NKey;\n return { original: originalI18NKey, new: newI18NKey };\n }\n}\n",
+ "properties": [
+ {
+ "name": "new",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9
+ },
+ {
+ "name": "original",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "KIIcon",
+ "id": "interface-KIIcon-508db0df3144860af26bdad86e8e75afb890fb963d917994d43ec7e3aa76fec6d94f776a5d0add72305ba13886d9f93812103e6a3b058c411a1e9fb2b3f76865",
+ "file": "src/assets/wise5/common/node-icon-chooser-dialog/node-icon-chooser-dialog.component.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { Component, Inject } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';\nimport { TeacherProjectService } from '../../services/teacherProjectService';\nimport { Node } from '../Node';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatButtonModule } from '@angular/material/button';\nimport { RouterModule } from '@angular/router';\n\ninterface KIIcon {\n imgAlt: string;\n imgLabel: string;\n imgSrc: string;\n}\n\n@Component({\n imports: [\n CommonModule,\n MatButtonModule,\n MatChipsModule,\n MatDialogModule,\n MatDividerModule,\n MatIconModule,\n MatTooltipModule,\n RouterModule\n ],\n selector: 'node-icon-chooser-dialog',\n styleUrl: 'node-icon-chooser-dialog.component.scss',\n templateUrl: 'node-icon-chooser-dialog.component.html'\n})\nexport class NodeIconChooserDialogComponent {\n protected colors = [\n '#66BB6A',\n '#009688',\n '#00B0FF',\n '#1565C0',\n '#673AB7',\n '#AB47BC',\n '#E91E63',\n '#D50000',\n '#F57C00',\n '#FBC02D',\n '#795548',\n '#757575'\n ];\n\n protected fontNames = [\n 'access_time',\n 'alarm',\n 'announcement',\n 'article',\n 'assignment',\n 'assignment_turned_in',\n 'bolt',\n 'book',\n 'bookmark',\n 'build',\n 'chrome_reader_mode',\n 'compare',\n 'create',\n 'dashboard',\n 'description',\n 'developer_board',\n 'domain',\n 'explore',\n 'extension',\n 'fact_check',\n 'favorite',\n 'flash_on',\n 'help',\n 'image',\n 'info',\n 'insert_chart',\n 'gamepad',\n 'lightbulb',\n 'live_tv',\n 'message',\n 'movie',\n 'note_add',\n 'pageview',\n 'palette',\n 'photo_camera',\n 'place',\n 'question_answer',\n 'search',\n 'school',\n 'slideshow',\n 'star',\n 'thumbs_up_down',\n 'trending_up',\n 'verified',\n 'verified_user',\n 'view_list'\n ];\n protected kiIcons: KIIcon[] = [\n {\n imgAlt: $localize`Knowledge Integration elicit ideas`,\n imgLabel: $localize`Elicit Ideas`,\n imgSrc: 'assets/img/icons/ki-color-elicit.svg'\n },\n {\n imgAlt: $localize`Knowledge Integration discover ideas`,\n imgLabel: $localize`Discover Ideas`,\n imgSrc: 'assets/img/icons/ki-color-add.svg'\n },\n {\n imgAlt: $localize`Knowledge Integration distinguish ideas`,\n imgLabel: $localize`Distinguish Ideas`,\n imgSrc: 'assets/img/icons/ki-color-distinguish.svg'\n },\n {\n imgAlt: $localize`Knowledge Integration connect ideas and reflect`,\n imgLabel: $localize`Connect Ideas & Reflect`,\n imgSrc: 'assets/img/icons/ki-color-connect.svg'\n },\n {\n imgAlt: $localize`Knowledge Integration cycle`,\n imgLabel: $localize`KI Cycle`,\n imgSrc: 'assets/img/icons/ki-color-cycle.svg'\n }\n ];\n protected newNodeIcon: any;\n protected node: Node;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) protected data: any,\n public dialogRef: MatDialogRef,\n private projectService: TeacherProjectService\n ) {}\n\n ngOnInit() {\n this.node = this.data.node;\n this.newNodeIcon = Object.assign({}, this.node.getIcon());\n }\n\n chooseFontColor(event: any): void {\n if (event.selected) {\n this.newNodeIcon.type = 'font';\n this.newNodeIcon.color = event.source.value;\n }\n }\n\n chooseFontName(event: any): void {\n if (event.selected) {\n this.newNodeIcon.type = 'font';\n this.newNodeIcon.fontName = event.source.value;\n }\n }\n\n chooseKIIcon(event: any): void {\n if (event.selected) {\n this.newNodeIcon.type = 'img';\n Object.assign(this.newNodeIcon, event.source.value);\n }\n }\n\n save(): void {\n const nodeContent = this.projectService.getNodeById(this.node.id);\n nodeContent.icon = Object.assign(this.node.getIcon(), this.newNodeIcon);\n this.projectService.saveProject();\n this.dialogRef.close();\n }\n}\n",
+ "properties": [
+ {
+ "name": "imgAlt",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14
+ },
+ {
+ "name": "imgLabel",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15
+ },
+ {
+ "name": "imgSrc",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "Language",
+ "id": "interface-Language-75a01c25629bcd4a3660302e8ceab049e4f699fb462fbb76d9f187806545c5625c2da9b5469dc8879367fe276b5ed5fcdd4751958758e090177511a057c784d5",
+ "file": "src/app/domain/language.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface Language {\n language: string;\n locale: string;\n}\n",
+ "properties": [
+ {
+ "name": "language",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "locale",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "Language",
+ "id": "interface-Language-814e60ce430b6efe363d49d12f4277e218a539fb98617ba23272d9a036fa2e35e1fc3ff5d31c6dc2e2d0e0516149adf7b8160b24fb1f2dfa2cf601bf5d69f17a-1",
+ "file": "src/assets/wise5/services/transcribeService.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { Injectable, WritableSignal, signal } from '@angular/core';\nimport { CognitoIdentityClient } from '@aws-sdk/client-cognito-identity';\nimport { fromCognitoIdentityPool } from '@aws-sdk/credential-provider-cognito-identity';\nimport {\n AudioStream,\n LanguageCode,\n TranscribeStreamingClient\n} from '@aws-sdk/client-transcribe-streaming';\nimport MicrophoneStream from 'microphone-stream';\nimport { StartStreamTranscriptionCommand } from '@aws-sdk/client-transcribe-streaming';\nimport { Buffer } from 'buffer';\nimport * as process from 'process';\nimport { ConfigService } from './configService';\nimport { ProjectService } from './projectService';\n\nwindow.process = process;\n// @ts-ignore\nwindow.Buffer = Buffer;\n\nexport interface Language {\n code: LanguageCode;\n name: string;\n}\n\n@Injectable()\nexport class TranscribeService {\n private SAMPLE_RATE = 44100;\n\n private allLanguages: Language[] = [\n { code: 'zh-CN', name: $localize`Chinese (Simplified)` },\n { code: 'en-US', name: $localize`English` },\n { code: 'fr-FR', name: $localize`French` },\n { code: 'de-DE', name: $localize`German` },\n { code: 'it-IT', name: $localize`Italian` },\n { code: 'ja-JP', name: $localize`Japanese` },\n { code: 'ko-KR', name: $localize`Korean` },\n { code: 'pt-BR', name: $localize`Portuguese (Brazilian)` },\n { code: 'es-US', name: $localize`Spanish` }\n ];\n readonly languages: Language[];\n private microphoneStream = undefined;\n private recordingSignal: WritableSignal = signal(false);\n readonly recording = this.recordingSignal.asReadonly();\n private selectedLanguageSignal: WritableSignal = signal({\n code: null,\n name: null\n });\n readonly selectedLanguage = this.selectedLanguageSignal.asReadonly();\n private transcribeClient: TranscribeStreamingClient = undefined;\n\n constructor(private configService: ConfigService, private projectService: ProjectService) {\n const { defaultLanguage, supportedLanguages } = this.projectService.project.speechToText;\n this.selectedLanguageSignal.set({\n code: defaultLanguage,\n name: this.allLanguages.find((language) => language.code === defaultLanguage).name\n });\n this.languages = this.allLanguages.filter((language) =>\n supportedLanguages.includes(language.code)\n );\n }\n\n async startRecording(\n languageCode: LanguageCode,\n callback: (text: string) => void\n ): Promise {\n if (this.microphoneStream || this.transcribeClient) {\n this.stopRecording();\n }\n this.createTranscribeClient();\n this.createMicrophoneStream();\n return await this.startStreaming(languageCode, callback);\n }\n\n stopRecording(): void {\n if (this.microphoneStream) {\n this.microphoneStream.stop();\n this.microphoneStream.destroy();\n this.microphoneStream = undefined;\n }\n if (this.transcribeClient) {\n this.transcribeClient.destroy();\n this.transcribeClient = undefined;\n }\n this.recordingSignal.set(false);\n }\n\n private createTranscribeClient(): void {\n const awsRegion = this.configService.getConfigParam('speechToTextAWSRegion');\n this.transcribeClient = new TranscribeStreamingClient({\n region: awsRegion,\n credentials: fromCognitoIdentityPool({\n client: new CognitoIdentityClient({ region: awsRegion }),\n identityPoolId: this.configService.getConfigParam('speechToTextAWSIdentityPoolId')\n })\n });\n }\n\n private async createMicrophoneStream(): Promise {\n this.microphoneStream = new MicrophoneStream();\n this.microphoneStream.setStream(\n await window.navigator.mediaDevices.getUserMedia({\n video: false,\n audio: true\n })\n );\n }\n\n private async startStreaming(\n languageCode: LanguageCode,\n callback: (text: string) => void\n ): Promise {\n const command = new StartStreamTranscriptionCommand({\n LanguageCode: languageCode,\n MediaEncoding: 'pcm',\n MediaSampleRateHertz: this.SAMPLE_RATE,\n AudioStream: this.getAudioStream()\n });\n this.recordingSignal.set(true);\n const data = await this.transcribeClient.send(command);\n for await (const event of data.TranscriptResultStream) {\n this.processTranscriptResultStreamEvent(event, callback);\n }\n }\n\n private async *getAudioStream(): AsyncIterable {\n for await (const chunk of this.microphoneStream) {\n if (chunk.length <= this.SAMPLE_RATE) {\n yield {\n AudioEvent: {\n AudioChunk: this.encodePCMChunk(chunk)\n }\n };\n }\n }\n }\n\n private encodePCMChunk(chunk: Buffer): Buffer {\n const input = MicrophoneStream.toRaw(chunk);\n let offset = 0;\n const buffer = new ArrayBuffer(input.length * 2);\n const view = new DataView(buffer);\n for (let i = 0; i < input.length; i++, offset += 2) {\n const s = Math.max(-1, Math.min(1, input[i]));\n view.setInt16(offset, s < 0 ? s * 0x8000 : s * 0x7fff, true);\n }\n return Buffer.from(buffer);\n }\n\n private processTranscriptResultStreamEvent(event: any, callback: (text: string) => void): void {\n for (const result of event.TranscriptEvent.Transcript.Results || []) {\n if (result.IsPartial === false) {\n this.processTranscriptResult(result, callback);\n }\n }\n }\n\n private processTranscriptResult(result: any, callback: (text: string) => void): void {\n const noOfResults = result.Alternatives[0].Items.length;\n for (let i = 0; i < noOfResults; i++) {\n let text = result.Alternatives[0].Items[i].Content;\n if (![',', '.', '?', '!', ':', ';'].includes(text)) {\n text = ' ' + text;\n }\n callback(text);\n }\n }\n\n setSelectedLanguage(language: Language): void {\n this.selectedLanguageSignal.set(language);\n }\n}\n",
+ "properties": [
+ {
+ "name": "code",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "LanguageCode",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 21
+ },
+ {
+ "name": "name",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 22
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [],
+ "isDuplicate": true,
+ "duplicateId": 1,
+ "duplicateName": "Language-1"
+ },
+ {
+ "name": "MatchCdkDragDrop",
+ "id": "interface-MatchCdkDragDrop-40220df592d845485b10915d40c54558bf83b945c51f0d40832fc478e387e74b05db3fa343f8538186763093fac2c03176f3e3bc52de9cf36332341ea33cc5f9",
+ "file": "src/assets/wise5/components/match/match-student/MatchCdkDragDrop.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { CdkDragDrop } from '@angular/cdk/drag-drop';\n\nexport interface MatchCdkDragDrop\n extends CdkDragDrop {}\n",
+ "properties": [],
+ "indexSignatures": [],
+ "methods": [],
+ "extends": [
+ "CdkDragDrop"
+ ]
+ },
+ {
+ "name": "MatchContent",
+ "id": "interface-MatchContent-d0ba68dc06345047867d031b2b90700f7fa1dfb458ef925bfd4d75c04d07c338f46d2eb2ec0bf017ac39a715f5095dcaa57d0d80c856e68c338db43834da6417",
+ "file": "src/assets/wise5/components/match/MatchContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComponentContent } from '../../common/ComponentContent';\nimport { Choice } from './choice';\n\nexport interface MatchContent extends ComponentContent {\n buckets: any[];\n canCreateChoices: boolean;\n choiceReuseEnabled: boolean;\n choices: Choice[];\n feedback: any[];\n ordered: boolean;\n}\n",
+ "properties": [
+ {
+ "name": "buckets",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "canCreateChoices",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "choiceReuseEnabled",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "choices",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Choice[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "feedback",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9
+ },
+ {
+ "name": "ordered",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "ComponentContent"
+ ]
+ },
+ {
+ "name": "MathJaxConfig",
+ "id": "interface-MathJaxConfig-aa8d39ef2650b2add7523f8cc5560526ce9e3adc045195f6c0f58117e8c3e58beb7419ddc00dd019539a582bb80422c24ffe96de0b24888e042e05ba8b070d0b",
+ "file": "src/app/math/math.service.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\nimport { NodeService } from '../../assets/wise5/services/nodeService';\n\ninterface MathJaxConfig {\n id: string;\n source: string;\n}\n\ndeclare global {\n interface Window {\n MathJax: {\n typesetPromise: () => void;\n startup: {\n promise: Promise;\n };\n };\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MathService {\n private signal: Subject;\n private mathJax: MathJaxConfig = {\n id: 'MathJaxScript',\n source: 'mathjax/es5/tex-mml-chtml.js'\n };\n\n constructor(private nodeService: NodeService) {\n this.signal = new ReplaySubject();\n void this.registerMathJaxAsync(this.mathJax)\n .then(() => {\n this.signal.next(true);\n })\n .catch((error) => console.error(error));\n this.nodeService.doneRenderingComponent$.subscribe(() => this.renderPage());\n }\n\n private async registerMathJaxAsync(config: MathJaxConfig): Promise {\n return new Promise((resolve: any, reject) => {\n const script: HTMLScriptElement = document.createElement('script');\n script.id = config.id;\n script.type = 'text/javascript';\n script.src = config.source;\n script.crossOrigin = 'anonymous';\n script.async = true;\n script.onload = () => resolve();\n script.onerror = (error) => reject(error);\n document.head.appendChild(script);\n });\n }\n\n ready(): Observable {\n return this.signal;\n }\n\n private renderPage(): void {\n window.MathJax.startup.promise.then(() => {\n window.MathJax.typesetPromise();\n });\n }\n}\n",
+ "properties": [
+ {
+ "name": "id",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "source",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "Milestone",
+ "id": "interface-Milestone-8f8883f2b95280ace90cd24fff54d77734d9b009ab665d13709dbfd4ab54bf5cd480d3a4bc232c34071ca06c87db693d5c00161d417e135d3ae04133f152fd2c",
+ "file": "src/app/domain/milestone.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface Milestone {\n id: string;\n nodeId: string;\n componentId: string;\n type: 'milestone' | 'milestoneReport';\n generatedReport?: any;\n generatedRecommendations?: any;\n items: any[];\n isReportAvailable: boolean;\n}\n",
+ "properties": [
+ {
+ "name": "componentId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "generatedRecommendations",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "generatedReport",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "id",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "isReportAvailable",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9
+ },
+ {
+ "name": "items",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "nodeId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "type",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "\"milestone\" | \"milestoneReport\"",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "MultipleChoiceContent",
+ "id": "interface-MultipleChoiceContent-5904816aca2a7d6409d46246e048c89576df32e682962d45eee961744695b1d88d70ab664ef149095132e74b211f27b9bfc02197c9457e06418fd21c4687bc8e",
+ "file": "src/assets/wise5/components/multipleChoice/MultipleChoiceContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComponentContent } from '../../common/ComponentContent';\nimport { Choice } from './Choice';\n\nexport interface MultipleChoiceContent extends ComponentContent {\n choices: Choice[];\n choiceType: 'checkbox' | 'radio';\n showFeedback: boolean;\n}\n",
+ "properties": [
+ {
+ "name": "choices",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Choice[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "choiceType",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "\"checkbox\" | \"radio\"",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "showFeedback",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "ComponentContent"
+ ]
+ },
+ {
+ "name": "NewNodeTemplate",
+ "id": "interface-NewNodeTemplate-158f516ab26f2a4612fe66caedb049a67b87582d84d7416b7da889743c8b92c517afc68d7c2772525077f47f0a15eb0c1323e44773680381c1c0f3981377f47f",
+ "file": "src/assets/wise5/authoringTool/addNode/NewNodeTemplate.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface NewNodeTemplate {\n label: string;\n icon: string;\n route: string;\n}\n",
+ "properties": [
+ {
+ "name": "icon",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "label",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "route",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "OpenResponseContent",
+ "id": "interface-OpenResponseContent-803824b886aa24ad3e6b4c22a5ac388e391b368d629ad06a3c67e414501ef0fe83290a18081e5bb98ff45db5d27524dd071a910a4c604cbbb24d93e4a6e31cb1",
+ "file": "src/assets/wise5/components/openResponse/OpenResponseContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComponentContent } from '../../common/ComponentContent';\n\nexport interface OpenResponseContent extends ComponentContent {\n completionCriteria: any;\n cRater: any;\n enableCRater: boolean;\n enableNotifications: boolean;\n isStudentAudioRecordingEnabled: boolean;\n maxSubmitCount?: number;\n notificationSettings: any;\n starterSentence: any;\n}\n",
+ "properties": [
+ {
+ "name": "completionCriteria",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "cRater",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "enableCRater",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "enableNotifications",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "isStudentAudioRecordingEnabled",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "maxSubmitCount",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 9
+ },
+ {
+ "name": "notificationSettings",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10
+ },
+ {
+ "name": "starterSentence",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "ComponentContent"
+ ]
+ },
+ {
+ "name": "OutsideUrlContent",
+ "id": "interface-OutsideUrlContent-040853838b6f08602745df73a0f69714290b03887f797ce8022b796d4f53c1677a48442c3247a153ab15154f166f661deeb7c3e0a2a86ce826f695da529c1cf2",
+ "file": "src/assets/wise5/components/outsideURL/OutsideUrlContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComponentContent } from '../../common/ComponentContent';\n\nexport interface OutsideUrlContent extends ComponentContent {\n height: number;\n url: string;\n width: number;\n}\n",
+ "properties": [
+ {
+ "name": "height",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "url",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "width",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "ComponentContent"
+ ]
+ },
+ {
+ "name": "PasswordRequirementHarnessFilters",
+ "id": "interface-PasswordRequirementHarnessFilters-974269e92af75a86ac46a9f3edf9791797806732920536df67093f8a7de689e133fab94777c60fa41e696c468f1a5c0e89090ce2a978160266e4794c3cd2a416",
+ "file": "src/app/password/password-requirement/password-requirement.harness.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import {\n BaseHarnessFilters,\n ComponentHarness,\n HarnessPredicate,\n TestElement\n} from '@angular/cdk/testing';\n\ninterface PasswordRequirementHarnessFilters extends BaseHarnessFilters {\n text?: string | RegExp;\n}\n\nexport class PasswordRequirementHarness extends ComponentHarness {\n static hostSelector = 'password-requirement';\n\n static with(\n options: PasswordRequirementHarnessFilters\n ): HarnessPredicate {\n return new HarnessPredicate(PasswordRequirementHarness, options).addOption(\n 'text',\n options.text,\n (harness, text) => {\n return HarnessPredicate.stringMatches(harness.getText(), text);\n }\n );\n }\n\n async getText(): Promise {\n const text = await this.locatorFor('.requirement-text')();\n return text.text();\n }\n\n async isPristine(): Promise {\n const icon = await this.getIcon();\n return icon == null;\n }\n\n async isFail(): Promise {\n return this.iconHasText('close');\n }\n\n async isPass(): Promise {\n return this.iconHasText('done');\n }\n\n private async iconHasText(text: string): Promise {\n const icon = await this.getIcon();\n return (await icon.text()) === text;\n }\n\n private async getIcon(): Promise {\n return await this.locatorForOptional('.mat-icon')();\n }\n}\n",
+ "properties": [
+ {
+ "name": "text",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string | RegExp",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 9
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "BaseHarnessFilters"
+ ]
+ },
+ {
+ "name": "PeerChatContent",
+ "id": "interface-PeerChatContent-152731b96e1fe363b90e8063553b4ec50a7df009b48cb1f538a1183bc5d8b99bf83c1947fd3bbf3a05bc49c3ed38dd7224ad73eca94c1c414dcb7edd7a9fd918",
+ "file": "src/assets/wise5/components/peerChat/PeerChatContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComponentContent } from '../../common/ComponentContent';\n\nexport interface PeerChatContent extends ComponentContent {\n peerGroupingTag: string;\n}\n",
+ "properties": [
+ {
+ "name": "peerGroupingTag",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "ComponentContent"
+ ]
+ },
+ {
+ "name": "PeerGroupingLogic",
+ "id": "interface-PeerGroupingLogic-822f881ca41cd0df1809d4e6dff592482ef6f2d4df3523a4dbdc5d30a64a274512aa86c2757c77fb67cc0d69b802c1b6b12437d0e12a9675825cad2e89cb0ce5",
+ "file": "src/assets/wise5/authoringTool/peer-grouping/PeerGroupingLogic.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface PeerGroupingLogic {\n name: string;\n value: string;\n}\n\nexport const DIFFERENT_IDEAS_NAME = $localize`Different Ideas`;\nexport const DIFFERENT_IDEAS_REGEX = /differentIdeas\\(\"(\\w+)\",\\s*\"(\\w+)\"?\"(,\\s*\")?(\\w+)?(\")?\\)/g;\nexport const DIFFERENT_IDEAS_VALUE = 'differentIdeas';\nexport const DIFFERENT_SCORES_NAME = $localize`Different Scores`;\nexport const DIFFERENT_SCORES_REGEX = /differentKIScores\\(\"(\\w+)\",\\s*\"(\\w+)?\"(,\\s*\")?(\\w+)?(\")?\\)/g;\nexport const DIFFERENT_SCORES_VALUE = 'differentKIScores';\n\nexport const AVAILABLE_LOGIC: PeerGroupingLogic[] = [\n { name: $localize`Random`, value: 'random' },\n { name: $localize`Manual`, value: 'manual' },\n { name: DIFFERENT_IDEAS_NAME, value: DIFFERENT_IDEAS_VALUE },\n { name: DIFFERENT_SCORES_NAME, value: DIFFERENT_SCORES_VALUE }\n];\n\nexport const AVAILABLE_MODES: any[] = [\n { name: $localize`Any`, value: 'any' },\n { name: $localize`Maximize`, value: 'maximize' }\n];\n",
+ "properties": [
+ {
+ "name": "name",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "value",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "ProjectAndTagsResponse",
+ "id": "interface-ProjectAndTagsResponse-eb96ca99c0595b92468b07c64df959e73f4754056f7c14cb4a539e4fa8e8babdf6478a4e29ad14ac0e5360e24358b0d4ec11b66bfe9ad8182a7dc09fd5bf0b7d",
+ "file": "src/app/domain/projectAndTagsResponse.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { Tag } from './tag';\n\nexport interface ProjectAndTagsResponse {\n projectId: number;\n tags: Tag[];\n}\n",
+ "properties": [
+ {
+ "name": "projectId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "tags",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Tag[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "ProjectAuthoringNodeHarnessFilters",
+ "id": "interface-ProjectAuthoringNodeHarnessFilters-e1b0fb59461318dd939bcdb76f696e61c89ae52f09d15eeec3876b7f932f7c57f5e71281e04c83fc301a88fa44885476dcfcaba0a340aa91f109be79b30d6d34",
+ "file": "src/assets/wise5/authoringTool/project-authoring/project-authoring-node.harness.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { BaseHarnessFilters, ComponentHarness } from '@angular/cdk/testing';\nimport { NodeIconAndTitleHarness } from '../choose-node-location/node-icon-and-title/node-icon-and-title.harness';\nimport { MatButtonHarness } from '@angular/material/button/testing';\n\nexport interface ProjectAuthoringNodeHarnessFilters extends BaseHarnessFilters {\n title?: string | RegExp;\n}\n\nexport class ProjectAuthoringNodeHarness extends ComponentHarness {\n getMoveButton = this.locatorFor(MatButtonHarness.with({ selector: '[matTooltip^=\"Move\"]' }));\n getDeleteButton = this.locatorFor(MatButtonHarness.with({ selector: '[matTooltip^=\"Delete\"]' }));\n getTitleElement = this.locatorFor(NodeIconAndTitleHarness);\n\n async getTitle(): Promise {\n const stepTitleElement = await this.getTitleElement();\n return await stepTitleElement.getPositionAndTitle();\n }\n}\n",
+ "properties": [
+ {
+ "name": "title",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string | RegExp",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 6
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "BaseHarnessFilters"
+ ]
+ },
+ {
+ "name": "RawCRaterResponse",
+ "id": "interface-RawCRaterResponse-8139ae9c5f9fc5956c5f37b72ead33f2ee30a72d92a70d616a40f2f78975d01727cc434c0eedab9cc427d8b504fd9d3cf5073bbf593868488af612d232196f3e",
+ "file": "src/assets/wise5/components/common/cRater/RawCRaterResponse.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface RawCRaterResponse {\n advisories: string[];\n feedback: any;\n response_id: string;\n scores?: any;\n trait_scores: any;\n}\n",
+ "properties": [
+ {
+ "name": "advisories",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "feedback",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "response_id",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9
+ },
+ {
+ "name": "scores",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 10
+ },
+ {
+ "name": "trait_scores",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "description": "CRaterResponses is the response object from the CRater API.\nThis is different from CRaterResponse, which is the object that WISE creates to store the\nresponse.
\n",
+ "rawdescription": "\n\nCRaterResponses is the response object from the CRater API.\nThis is different from CRaterResponse, which is the object that WISE creates to store the\nresponse.\n",
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "RunStatus",
+ "id": "interface-RunStatus-4871f71add9741b4d6c4b924f75e158490b4cd800cd0b8f76f987d6bd274f2b846503747b34e2e524ad40a165e2e42dbf43e02130b63301fe71b502a89a96f1f",
+ "file": "src/assets/wise5/common/RunStatus.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface RunStatus {\n runId?: any;\n periods: any[];\n}\n",
+ "properties": [
+ {
+ "name": "periods",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "runId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 2
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "SchoolLevel",
+ "id": "interface-SchoolLevel-e9f8d03f314a03711fd96e0be4c08a1113257c3c19b89b2dfedaf57650471cddad7b7bf197515b3347bb2d41e42a2c97c1aef2d7b844a73cd12d9fdc2930864f",
+ "file": "src/app/domain/profile.constants.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export const schoolLevels: SchoolLevel[] = [\n { code: 'ELEMENTARY_SCHOOL', label: $localize`Elementary School` },\n { code: 'MIDDLE_SCHOOL', label: $localize`Middle School` },\n { code: 'HIGH_SCHOOL', label: $localize`High School` },\n { code: 'COLLEGE', label: $localize`College` },\n { code: 'OTHER', label: $localize`Other` }\n];\n\nexport interface SchoolLevel {\n code: string;\n label: string;\n}\n",
+ "properties": [
+ {
+ "name": "code",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10
+ },
+ {
+ "name": "label",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "SelectNodeEvent",
+ "id": "interface-SelectNodeEvent-babe51cb9fee946a2173852f3734786ee79beb4874503e231e72e16115457e52b49e3fa898f789eaac825c546e4d3454e3b254e5710bf84252dfbedb1a377f4c",
+ "file": "src/assets/wise5/authoringTool/domain/select-node-event.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface SelectNodeEvent {\n checked: boolean;\n id: string;\n}\n",
+ "properties": [
+ {
+ "name": "checked",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "id",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "Series",
+ "id": "interface-Series-609d8928075e536e9612ee5c1ff784c69b899829d4f209356960039095ca9ae97cc10232e44a428abee3f95e10be48fc104a448c8f9647c8ee859fbc73f9e457",
+ "file": "src/assets/wise5/components/graph/domain/series.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface Series {\n color: string;\n data: any[];\n enableMouseTracking?: boolean;\n name: string;\n type: string;\n yAxis: any;\n}\n",
+ "properties": [
+ {
+ "name": "color",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "data",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "enableMouseTracking",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "name",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "type",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "yAxis",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "SnackbarData",
+ "id": "interface-SnackbarData-7515930b3feb4de25762ed5d19f05ef8be9a2b6f2e1091ed6325aed4203989ee0ab4b830af1a9ad41bc641e380d4d587d31b6e80a67a6f9eb070c1b252cd96fe",
+ "file": "src/stories/snackbar/snackbar-trigger/snackbar-trigger.component.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { Component, inject, model } from '@angular/core';\nimport {\n MAT_SNACK_BAR_DATA,\n MatSnackBar,\n MatSnackBarAction,\n MatSnackBarActions,\n MatSnackBarHorizontalPosition,\n MatSnackBarLabel,\n MatSnackBarRef,\n MatSnackBarVerticalPosition\n} from '@angular/material/snack-bar';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatIconModule } from '@angular/material/icon';\n\nexport interface SnackbarData {\n message: string;\n action: string;\n}\n\n@Component({\n selector: 'snackbar-trigger',\n templateUrl: './snackbar-trigger.component.html',\n imports: [\n MatFormFieldModule,\n MatInputModule,\n MatSelectModule,\n FormsModule,\n MatButtonModule,\n MatCheckboxModule\n ]\n})\nexport class SnackbarTriggerComponent {\n protected message: string = 'Hello world!';\n protected action: string = 'Close';\n protected duration: number = 10;\n protected horizontalPosition: MatSnackBarHorizontalPosition = 'center';\n protected verticalPosition: MatSnackBarVerticalPosition = 'bottom';\n protected useCustomComponent: boolean = false;\n\n constructor(private _snackBar: MatSnackBar) {}\n\n openSnackBar() {\n if (this.useCustomComponent) {\n this._snackBar.openFromComponent(CustomSnackbarComponent, {\n duration: this.duration * 1000,\n horizontalPosition: this.horizontalPosition,\n verticalPosition: this.verticalPosition,\n data: { message: this.message, action: this.action }\n });\n } else {\n this._snackBar.open(this.message, this.action, {\n duration: this.duration * 1000,\n horizontalPosition: this.horizontalPosition,\n verticalPosition: this.verticalPosition\n });\n }\n }\n}\n\n@Component({\n selector: 'custom-snackbar',\n templateUrl: './custom-snackbar.html',\n styles: `\n :host {\n display: flex;\n\n .mat-icon {\n color: var(--mat-sys-error-container);\n }\n }\n `,\n imports: [MatButtonModule, MatIconModule, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction]\n})\nexport class CustomSnackbarComponent {\n readonly snackBarRef = inject(MatSnackBarRef);\n readonly data = inject(MAT_SNACK_BAR_DATA);\n readonly message = model(this.data.message);\n readonly action = model(this.data.action);\n}\n",
+ "properties": [
+ {
+ "name": "action",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 22
+ },
+ {
+ "name": "message",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 21
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "StudentAssetRequest",
+ "id": "interface-StudentAssetRequest-116de3d2d3ac153adc9e04d2048ecf81af1abac317d2575e55316a6114d8e88a1a85110a11a1d4b7913dc7730d95bc8ce15db285a1979d757069b5c1d290b0ba",
+ "file": "src/assets/wise5/vle/studentAsset/StudentAssetRequest.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { Component } from '../../common/Component';\n\nexport interface StudentAssetRequest {\n asset: any;\n component: Component;\n}\n",
+ "properties": [
+ {
+ "name": "asset",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "component",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Component",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "TableContent",
+ "id": "interface-TableContent-b4375915b36097d0c9d0fd2a4ea7a19ab84edf8464fa602a454f8b459a64a8726bbf390528ddb7151441ef4ad5c6b4546dfb2689e4bef37df96d14c48fccb3b7",
+ "file": "src/assets/wise5/components/table/TableContent.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { ComponentContent } from '../../common/ComponentContent';\n\nexport interface TableContent extends ComponentContent {\n dataExplorerDataToColumn: any;\n dataExplorerGraphTypes: any;\n dataExplorerSeriesParams: any;\n enableRowSelection: boolean;\n isDataExplorerAxisLabelsEditable: boolean;\n isDataExplorerEnabled: boolean;\n numColumns: number;\n numDataExplorerSeries: number;\n numDataExplorerYAxis: number;\n numRows: number;\n tableData: any;\n}\n",
+ "properties": [
+ {
+ "name": "dataExplorerDataToColumn",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "dataExplorerGraphTypes",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "dataExplorerSeriesParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "enableRowSelection",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "isDataExplorerAxisLabelsEditable",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "isDataExplorerEnabled",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9
+ },
+ {
+ "name": "numColumns",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10
+ },
+ {
+ "name": "numDataExplorerSeries",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11
+ },
+ {
+ "name": "numDataExplorerYAxis",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12
+ },
+ {
+ "name": "numRows",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13
+ },
+ {
+ "name": "tableData",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "ComponentContent"
+ ]
+ },
+ {
+ "name": "Tag",
+ "id": "interface-Tag-90aaa8af62408ca321895c3eb32c9f206cd94c4b52b908e01ce9b0518291ee179336cb756830e27d5d2169f918c63e5d28ec609b1d729f65ddba35dbea2e6b6f",
+ "file": "src/app/domain/tag.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface Tag {\n color: string;\n id: number;\n numProjectsWithTag?: number;\n selected?: boolean;\n text: string;\n}\n",
+ "properties": [
+ {
+ "name": "color",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 2
+ },
+ {
+ "name": "id",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 3
+ },
+ {
+ "name": "numProjectsWithTag",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 4
+ },
+ {
+ "name": "selected",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "text",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "TeacherRunListItemHarnessFilters",
+ "id": "interface-TeacherRunListItemHarnessFilters-75d49496356e4f4e25dbb05cd8677203e04ef4403312bfc90bf0a7443baf3797728b5df983e7cc36da1e7733da3a0c83e21ed0231ec47fd564753e4a19518eac",
+ "file": "src/app/teacher/teacher-run-list-item/teacher-run-list-item.harness.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\nimport { MatCheckboxHarness } from '@angular/material/checkbox/testing';\nimport { MatCardHarness } from '@angular/material/card/testing';\nimport { RunMenuHarness } from '../run-menu/run-menu.harness';\n\nexport interface TeacherRunListItemHarnessFilters extends BaseHarnessFilters {\n title?: string | RegExp;\n}\n\nexport class TeacherRunListItemHarness extends ComponentHarness {\n static hostSelector = 'app-teacher-run-list-item';\n protected getCard = this.locatorFor(MatCardHarness);\n protected getCheckbox = this.locatorFor(MatCheckboxHarness);\n protected getMenu = this.locatorFor(RunMenuHarness);\n\n static with(\n options: TeacherRunListItemHarnessFilters\n ): HarnessPredicate {\n return new HarnessPredicate(TeacherRunListItemHarness, options).addOption(\n 'title',\n options.title,\n async (harness, title) => {\n return HarnessPredicate.stringMatches(harness.getRunTitle(), title);\n }\n );\n }\n\n async checkCheckbox(): Promise {\n return (await this.getCheckbox()).check();\n }\n\n async isChecked(): Promise {\n return (await this.getCheckbox()).isChecked();\n }\n\n async clickArchiveMenuButton(): Promise {\n return (await this.getMenu()).clickArchiveMenuButton();\n }\n\n async clickUnarchiveMenuButton(): Promise {\n return (await this.getMenu()).clickUnarchiveMenuButton();\n }\n\n async getRunTitle(): Promise {\n return (await this.getCard()).getTitleText();\n }\n\n async isArchived(): Promise {\n return (await this.getMenu()).hasRestoreMenuButton();\n }\n}\n",
+ "properties": [
+ {
+ "name": "title",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string | RegExp",
+ "indexKey": "",
+ "optional": true,
+ "description": "",
+ "line": 7
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": [
+ "BaseHarnessFilters"
+ ]
+ },
+ {
+ "name": "Translations",
+ "id": "interface-Translations-889f7a9b8d4c2c84e317b119e3ff2ca2a193eb5a64382bd86f3f1c084edb8aafb7470cdb781124644831a7f416edf8a4edef14eae578c51189b3ae731d63cac2",
+ "file": "src/app/domain/translations.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface Translations extends Record {}\n\nexport interface TranslationValue {\n value: string;\n modified: number;\n}\n",
+ "properties": [],
+ "indexSignatures": [],
+ "methods": [],
+ "extends": [
+ "Record"
+ ]
+ },
+ {
+ "name": "TranslationValue",
+ "id": "interface-TranslationValue-889f7a9b8d4c2c84e317b119e3ff2ca2a193eb5a64382bd86f3f1c084edb8aafb7470cdb781124644831a7f416edf8a4edef14eae578c51189b3ae731d63cac2",
+ "file": "src/app/domain/translations.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "export interface Translations extends Record {}\n\nexport interface TranslationValue {\n value: string;\n modified: number;\n}\n",
+ "properties": [
+ {
+ "name": "modified",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 5
+ },
+ {
+ "name": "value",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 4
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ },
+ {
+ "name": "Window",
+ "id": "interface-Window-aa8d39ef2650b2add7523f8cc5560526ce9e3adc045195f6c0f58117e8c3e58beb7419ddc00dd019539a582bb80422c24ffe96de0b24888e042e05ba8b070d0b",
+ "file": "src/app/math/math.service.ts",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "interface",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\nimport { NodeService } from '../../assets/wise5/services/nodeService';\n\ninterface MathJaxConfig {\n id: string;\n source: string;\n}\n\ndeclare global {\n interface Window {\n MathJax: {\n typesetPromise: () => void;\n startup: {\n promise: Promise;\n };\n };\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MathService {\n private signal: Subject;\n private mathJax: MathJaxConfig = {\n id: 'MathJaxScript',\n source: 'mathjax/es5/tex-mml-chtml.js'\n };\n\n constructor(private nodeService: NodeService) {\n this.signal = new ReplaySubject();\n void this.registerMathJaxAsync(this.mathJax)\n .then(() => {\n this.signal.next(true);\n })\n .catch((error) => console.error(error));\n this.nodeService.doneRenderingComponent$.subscribe(() => this.renderPage());\n }\n\n private async registerMathJaxAsync(config: MathJaxConfig): Promise {\n return new Promise((resolve: any, reject) => {\n const script: HTMLScriptElement = document.createElement('script');\n script.id = config.id;\n script.type = 'text/javascript';\n script.src = config.source;\n script.crossOrigin = 'anonymous';\n script.async = true;\n script.onload = () => resolve();\n script.onerror = (error) => reject(error);\n document.head.appendChild(script);\n });\n }\n\n ready(): Observable {\n return this.signal;\n }\n\n private renderPage(): void {\n window.MathJax.startup.promise.then(() => {\n window.MathJax.typesetPromise();\n });\n }\n}\n",
+ "properties": [
+ {
+ "name": "MathJax",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "literal type",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12
+ }
+ ],
+ "indexSignatures": [],
+ "kind": 172,
+ "methods": [],
+ "extends": []
+ }
+ ],
+ "injectables": [
+ {
+ "name": "AccessLinkService",
+ "id": "injectable-AccessLinkService-a3bb58a6728df3842050b8921e77819b9edae1e5403b0c8540839515d283dc811d9bbfcb516da7b27366b483f6cf6349c98764044a1082a599edbf996ced2999",
+ "file": "src/app/services/accessLinkService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "getAccessLinks",
+ "args": [
+ {
+ "name": "runCode",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periods",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string[]",
+ "typeParameters": [],
+ "line": 8,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "runCode",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periods",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getPeriodFromAccessLink",
+ "args": [
+ {
+ "name": "link",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 14,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "link",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { ConfigService } from './config.service';\n\n@Injectable()\nexport class AccessLinkService {\n constructor(private configService: ConfigService) {}\n\n getAccessLinks(runCode: string, periods: string[]): string[] {\n const host = this.configService.getWISEHostname() + this.configService.getContextPath();\n const linkBase = `${host}/run-survey/${runCode}-`;\n return periods.map((period) => linkBase + period);\n }\n\n getPeriodFromAccessLink(link: string): string {\n return link.slice(link.lastIndexOf('-') + 1);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 5,
+ "jsdoctags": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "AchievementService",
+ "id": "injectable-AchievementService-2cb7719b18b3cf1f437e2732f32092ae3f89b633a11c78a35784717cc19be4d067929bec0fafdb637c2df917da3563f04425dd877ec8873c43c497504ed0b2bd",
+ "file": "src/assets/wise5/services/achievementService.ts",
+ "properties": [
+ {
+ "name": "achievementCompleted$",
+ "defaultValue": "this.achievementCompletedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "achievementCompletedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "debug",
+ "defaultValue": "false",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "boolean",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14
+ },
+ {
+ "name": "newStudentAchievement$",
+ "defaultValue": "this.newStudentAchievementSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 18,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "newStudentAchievementSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 17,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "studentAchievementsByWorkgroupId",
+ "defaultValue": "{}",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13
+ }
+ ],
+ "methods": [
+ {
+ "name": "addOrUpdateStudentAchievement",
+ "args": [
+ {
+ "name": "studentAchievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 114,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nAdd Achievement to local bookkeeping\n",
+ "description": "Add Achievement to local bookkeeping
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 4494,
+ "end": 4512,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "studentAchievement"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4488,
+ "end": 4493,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student achievement to add or update
\n"
+ }
+ ]
+ },
+ {
+ "name": "broadcastAchievementCompleted",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 455,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastNewStudentAchievement",
+ "args": [
+ {
+ "name": "achievement",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 459,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "achievement",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "checkAggregateAchievement",
+ "args": [
+ {
+ "name": "projectAchievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 384,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the student completed a aggregate achievement\n",
+ "description": "Check if the student completed a aggregate achievement
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 14135,
+ "end": 14153,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "projectAchievement"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14129,
+ "end": 14134,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an aggregate achievement
\n"
+ },
+ {
+ "tagName": {
+ "pos": 14185,
+ "end": 14191,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the student completed the aggregate achievement
\n"
+ }
+ ]
+ },
+ {
+ "name": "createAchievementsURLBody",
+ "args": [
+ {
+ "name": "studentAchievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 146,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "studentAchievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createAchievementsURLParams",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "type",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 34,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "type",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createAggregateAchievementListener",
+ "args": [
+ {
+ "name": "projectAchievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 355,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate a listener for an aggregate achievement\n",
+ "description": "Create a listener for an aggregate achievement
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 13032,
+ "end": 13050,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "projectAchievement"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 13026,
+ "end": 13031,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the project achievement
\n"
+ },
+ {
+ "tagName": {
+ "pos": 13081,
+ "end": 13087,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "the subscription object that we will use later to unsubscribe from the observable
\n"
+ }
+ ]
+ },
+ {
+ "name": "createListenerFunction",
+ "args": [
+ {
+ "name": "projectAchievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 217,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "projectAchievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createNewStudentAchievement",
+ "args": [
+ {
+ "name": "type",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "achievementId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "data",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "workgroupId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "{ id: any; type: any; achievementId: any; workgroupId: any; data: any; }",
+ "typeParameters": [],
+ "line": 193,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreates a new student achievement object\n",
+ "description": "Creates a new student achievement object
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 7193,
+ "end": 7197,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "type"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 7187,
+ "end": 7192,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "type of achievement ["completion", "milestone", etc]
\n"
+ },
+ {
+ "name": {
+ "pos": 7263,
+ "end": 7276,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "achievementId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 7257,
+ "end": 7262,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "id of achievement in project content
\n"
+ },
+ {
+ "name": {
+ "pos": 7326,
+ "end": 7330,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "data"
+ },
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "pos": 7320,
+ "end": 7325,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "other extra information about this achievement
\n"
+ },
+ {
+ "name": {
+ "pos": 7390,
+ "end": 7401,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "pos": 7384,
+ "end": 7389,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "id of workgroup whom this achievement is for
\n"
+ },
+ {
+ "tagName": {
+ "pos": 7453,
+ "end": 7460,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "newly created student achievement object
\n"
+ }
+ ]
+ },
+ {
+ "name": "createStudentAchievement",
+ "args": [
+ {
+ "name": "achievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "data",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "{}"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 255,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate achievement and save to server\n",
+ "description": "Create achievement and save to server
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 9547,
+ "end": 9558,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "achievement"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9541,
+ "end": 9546,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the achievement the student completed
\n"
+ },
+ {
+ "name": "data",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "{}",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createStudentWorkSavedListener",
+ "args": [
+ {
+ "name": "projectAchievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 288,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate a listener for the component completed achievement\n",
+ "description": "Create a listener for the component completed achievement
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 10755,
+ "end": 10773,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "projectAchievement"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 10749,
+ "end": 10754,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the achievement to listen for
\n"
+ },
+ {
+ "tagName": {
+ "pos": 10810,
+ "end": 10816,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "the subscription object that we will use later to unsubscribe from the observable
\n"
+ }
+ ]
+ },
+ {
+ "name": "debugOutput",
+ "args": [
+ {
+ "name": "str",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 28,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "str",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAchievementIdToStudentAchievementsMappings",
+ "args": [],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 445,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet a mapping from achievement id to array of student projectAchievements\nstudent projectAchievements are created when a workgroup completes an achievement.\n",
+ "description": "Get a mapping from achievement id to array of student projectAchievements\nstudent projectAchievements are created when a workgroup completes an achievement.
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 16492,
+ "end": 16498,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a mapping from achievement id to array of student projectAchievements\nstudent projectAchievements are created when a workgroup completes an achievement.
\n"
+ }
+ ]
+ },
+ {
+ "name": "getStudentAchievementsByAchievementId",
+ "args": [
+ {
+ "name": "achievementId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 421,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet an array of student projectAchievements for a given achievement id\ncreated when a workgroup completes an achievement.\n",
+ "description": "Get an array of student projectAchievements for a given achievement id\ncreated when a workgroup completes an achievement.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 15402,
+ "end": 15415,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "achievementId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 15396,
+ "end": 15401,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "a 10 character achievement id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 15452,
+ "end": 15458,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "an array of student projectAchievements. student projectAchievements are\ncreated when a workgroup completes an achievement.
\n"
+ }
+ ]
+ },
+ {
+ "name": "getStudentAchievementsByWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 402,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet student achievements for a workgroup id\n",
+ "description": "Get student achievements for a workgroup id
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 14680,
+ "end": 14691,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "pos": 14674,
+ "end": 14679,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the workgroup id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 14715,
+ "end": 14721,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "an array of student achievements completed by the workgroup
\n"
+ }
+ ]
+ },
+ {
+ "name": "isAchievementCompletedByStudent",
+ "args": [
+ {
+ "name": "projectAchievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 331,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the student completed a node completed achievement\n",
+ "description": "Check if the student completed a node completed achievement
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 12338,
+ "end": 12356,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "projectAchievement"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 12332,
+ "end": 12337,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "a node completed achievement
\n"
+ },
+ {
+ "tagName": {
+ "pos": 12392,
+ "end": 12398,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the student completed the node completed achievement
\n"
+ }
+ ]
+ },
+ {
+ "name": "isCriterionSatisfied",
+ "args": [
+ {
+ "name": "satisfyCriterion",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 340,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "satisfyCriterion",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isProjectAchievementSatisfied",
+ "args": [
+ {
+ "name": "projectAchievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 310,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the student completed a specific achievement\n",
+ "description": "Check if the student completed a specific achievement
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 11608,
+ "end": 11626,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "projectAchievement"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 11602,
+ "end": 11607,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an achievement
\n"
+ },
+ {
+ "tagName": {
+ "pos": 11648,
+ "end": 11654,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the student completed the achievement
\n"
+ }
+ ]
+ },
+ {
+ "name": "isStudentAchievementExists",
+ "args": [
+ {
+ "name": "achievementId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 240,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the student has completed the achievement\n",
+ "description": "Check if the student has completed the achievement
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 9055,
+ "end": 9068,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "achievementId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9049,
+ "end": 9054,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": ""
+ },
+ {
+ "tagName": {
+ "pos": 9075,
+ "end": 9081,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the student has completed the achievement
\n"
+ }
+ ]
+ },
+ {
+ "name": "registerAchievementListeners",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 206,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "retrieveStudentAchievements",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "type",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 48,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "type",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "saveAchievementToServer",
+ "args": [
+ {
+ "name": "studentAchievement",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 164,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nSaves the achievement for the logged-in user\n",
+ "description": "Saves the achievement for the logged-in user
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 6469,
+ "end": 6487,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "studentAchievement"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 6463,
+ "end": 6468,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": ""
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "'use strict';\n\nimport { HttpClient, HttpParams } from '@angular/common/http';\nimport { ConfigService } from './configService';\nimport { ProjectService } from './projectService';\nimport { StudentDataService } from './studentDataService';\nimport { Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { CompletionService } from './completionService';\n\n@Injectable()\nexport class AchievementService {\n studentAchievementsByWorkgroupId: any = {};\n debug: boolean = false;\n private achievementCompletedSource: Subject = new Subject();\n public achievementCompleted$: Observable = this.achievementCompletedSource.asObservable();\n private newStudentAchievementSource: Subject = new Subject();\n public newStudentAchievement$: Observable = this.newStudentAchievementSource.asObservable();\n\n constructor(\n private http: HttpClient,\n private completionService: CompletionService,\n private ConfigService: ConfigService,\n private ProjectService: ProjectService,\n private StudentDataService: StudentDataService\n ) {}\n\n debugOutput(str) {\n if (this.debug) {\n console.log(str);\n }\n }\n\n createAchievementsURLParams(workgroupId, type) {\n let params = new HttpParams();\n if (workgroupId != null) {\n params = params.set('workgroupId', workgroupId);\n } else if (this.ConfigService.getMode() !== 'classroomMonitor') {\n params = params.set('workgroupId', this.ConfigService.getWorkgroupId());\n params = params.set('periodId', this.ConfigService.getPeriodId());\n }\n if (type != null) {\n params = params.set('type', type);\n }\n return params;\n }\n\n retrieveStudentAchievements(workgroupId = null, type = null) {\n if (this.ConfigService.isPreview()) {\n const workgroupId = this.ConfigService.getWorkgroupId();\n this.studentAchievementsByWorkgroupId[workgroupId] = [];\n return Promise.resolve(this.studentAchievementsByWorkgroupId);\n } else {\n const url = this.ConfigService.getAchievementsURL();\n const options = {\n params: this.createAchievementsURLParams(workgroupId, type)\n };\n return this.http\n .get(url, options)\n .toPromise()\n .then((studentAchievements: any[]) => {\n for (const studentAchievement of studentAchievements) {\n this.addOrUpdateStudentAchievement(studentAchievement);\n if (this.ConfigService.isStudentRun()) {\n const projectAchievement = this.ProjectService.getAchievementByAchievementId(\n studentAchievement.achievementId\n );\n if (projectAchievement != null) {\n /*\n * set the completed field to true in case we ever\n * need to easily see which projectAchievements the student\n * has completed\n */\n projectAchievement.completed = true;\n if (projectAchievement.deregisterFunction != null) {\n /*\n * the student has completed this achievement\n * so we no longer need to listen for it\n */\n projectAchievement.deregisterFunction();\n this.debugOutput('deregistering ' + projectAchievement.id);\n }\n }\n }\n }\n\n if (this.ConfigService.isStudentRun()) {\n /*\n * Loop through all the projectAchievements and re-evaluate whether the student has\n * completed each when the student loads the VLE. This is to make sure that students\n * never get stuck in a state where they did everything required to complete a certain\n * achievement but some error or bug occurred which prevented their student achievement\n * from being saved and then they end up never being able to complete that achievement.\n */\n for (const projectAchievement of this.ProjectService.getAchievementItems()) {\n if (\n !this.isStudentAchievementExists(projectAchievement.id) &&\n this.isProjectAchievementSatisfied(projectAchievement)\n ) {\n this.createStudentAchievement(projectAchievement);\n }\n }\n this.registerAchievementListeners();\n }\n return this.studentAchievementsByWorkgroupId;\n });\n }\n }\n\n /**\n * Add Achievement to local bookkeeping\n * @param studentAchievement the student achievement to add or update\n */\n addOrUpdateStudentAchievement(studentAchievement) {\n if (studentAchievement != null) {\n const achievementWorkgroupId = studentAchievement.workgroupId;\n if (this.studentAchievementsByWorkgroupId[achievementWorkgroupId] == null) {\n this.studentAchievementsByWorkgroupId[achievementWorkgroupId] = new Array();\n }\n const achievements = this.studentAchievementsByWorkgroupId[achievementWorkgroupId];\n let found = false;\n for (let achievementIndex = 0; achievementIndex < achievements.length; achievementIndex++) {\n let achievement = achievements[achievementIndex];\n if (\n achievement.achievementId != null &&\n achievement.achievementId === studentAchievement.achievementId &&\n achievement.workgroupId != null &&\n achievement.workgroupId === studentAchievement.workgroupId\n ) {\n /*\n * the achievement 10 character alphanumeric id matches and\n * the workgroup id matches so we will update it\n */\n achievements[achievementIndex] = studentAchievement;\n found = true; // remember this so we don't insert later.\n break;\n }\n }\n if (!found) {\n // we did not find the achievement so we will add it to the array\n achievements.push(studentAchievement);\n }\n }\n }\n\n createAchievementsURLBody(studentAchievement) {\n let body = new HttpParams()\n .set('achievementId', studentAchievement.achievementId)\n .set('workgroupId', studentAchievement.workgroupId)\n .set('type', studentAchievement.type);\n if (studentAchievement.id != null) {\n body = body.set('id', studentAchievement.id);\n }\n if (studentAchievement.data != null) {\n body = body.set('data', JSON.stringify(studentAchievement.data));\n }\n return body;\n }\n\n /**\n * Saves the achievement for the logged-in user\n * @param studentAchievement\n */\n saveAchievementToServer(studentAchievement) {\n if (this.ConfigService.isPreview()) {\n return Promise.resolve(studentAchievement);\n } else {\n const url = this.ConfigService.getAchievementsURL();\n const body = this.createAchievementsURLBody(studentAchievement);\n const options = {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n }\n };\n return this.http\n .post(url, body, options)\n .toPromise()\n .then((achievement: any) => {\n this.addOrUpdateStudentAchievement(achievement);\n return achievement;\n });\n }\n }\n\n /**\n * Creates a new student achievement object\n * @param type type of achievement [\"completion\", \"milestone\", etc]\n * @param achievementId id of achievement in project content\n * @param data other extra information about this achievement\n * @param workgroupId id of workgroup whom this achievement is for\n * @returns newly created student achievement object\n */\n createNewStudentAchievement(type, achievementId, data = null, workgroupId = null) {\n if (workgroupId == null) {\n workgroupId = this.ConfigService.getWorkgroupId();\n }\n return {\n id: null,\n type: type,\n achievementId: achievementId,\n workgroupId: workgroupId,\n data: data\n };\n }\n\n registerAchievementListeners() {\n const projectAchievements = this.ProjectService.getAchievements();\n if (projectAchievements.isEnabled) {\n for (const projectAchievement of projectAchievements.items) {\n if (!this.isStudentAchievementExists(projectAchievement.id)) {\n this.createListenerFunction(projectAchievement);\n }\n }\n }\n }\n\n createListenerFunction(projectAchievement) {\n let deregisterListenerFunction = null;\n if (\n projectAchievement.type === 'milestone' ||\n projectAchievement.type === 'milestoneReport' ||\n projectAchievement.type === 'completion'\n ) {\n deregisterListenerFunction = this.createStudentWorkSavedListener(projectAchievement);\n } else if (projectAchievement.type === 'aggregate') {\n deregisterListenerFunction = this.createAggregateAchievementListener(projectAchievement);\n }\n /*\n * set the deregisterListenerFunction into the project achievement so that we can deregister the\n * listener after the student has completed the achievement\n */\n projectAchievement.deregisterListenerFunction = deregisterListenerFunction;\n }\n\n /**\n * Check if the student has completed the achievement\n * @param achievementId\n * @return whether the student has completed the achievement\n */\n isStudentAchievementExists(achievementId) {\n const workgroupId = this.ConfigService.getWorkgroupId();\n const achievements = this.getStudentAchievementsByWorkgroupId(workgroupId);\n for (const achievement of achievements) {\n if (achievement.achievementId === achievementId) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Create achievement and save to server\n * @param achievement the achievement the student completed\n */\n createStudentAchievement(achievement, data = {}) {\n if (achievement.isVisible) {\n alert(`Congratulations you completed: ${achievement.name}`);\n }\n\n const projectAchievement = this.ProjectService.getAchievementByAchievementId(achievement.id);\n if (projectAchievement != null && projectAchievement.deregisterListenerFunction != null) {\n /*\n * deregister the achievement listener now that the student has\n * completed the achievement\n */\n projectAchievement.deregisterListenerFunction.unsubscribe();\n this.debugOutput('deregistering ' + projectAchievement.id);\n }\n\n const workgroupId = this.ConfigService.getWorkgroupId();\n const newAchievement = this.createNewStudentAchievement(\n achievement.type,\n achievement.id,\n data,\n workgroupId\n );\n const achievements = this.getStudentAchievementsByWorkgroupId(workgroupId);\n achievements.push(newAchievement);\n this.saveAchievementToServer(newAchievement);\n this.broadcastAchievementCompleted({ achievementId: achievement.id });\n }\n\n /**\n * Create a listener for the component completed achievement\n * @param projectAchievement the achievement to listen for\n * @return the subscription object that we will use later to unsubscribe from the observable\n */\n createStudentWorkSavedListener(projectAchievement) {\n this.debugOutput('registering ' + projectAchievement.id);\n return this.StudentDataService.studentWorkSavedToServer$.subscribe((componentState: any) => {\n this.debugOutput(\n 'createStudentWorkSavedListener checking ' +\n projectAchievement.id +\n ' completed ' +\n componentState.nodeId\n );\n if (!this.isStudentAchievementExists(projectAchievement.id)) {\n if (this.isAchievementCompletedByStudent(projectAchievement)) {\n this.createStudentAchievement(projectAchievement);\n }\n }\n });\n }\n\n /**\n * Check if the student completed a specific achievement\n * @param projectAchievement an achievement\n * @return whether the student completed the achievement\n */\n isProjectAchievementSatisfied(projectAchievement) {\n let completed = false;\n if (projectAchievement != null) {\n if (\n projectAchievement.type === 'milestone' ||\n projectAchievement.type === 'milestoneReport' ||\n projectAchievement.type === 'completion'\n ) {\n completed = this.isAchievementCompletedByStudent(projectAchievement);\n } else if (projectAchievement.type === 'aggregate') {\n completed = this.checkAggregateAchievement(projectAchievement);\n }\n }\n return completed;\n }\n\n /**\n * Check if the student completed a node completed achievement\n * @param projectAchievement a node completed achievement\n * @return whether the student completed the node completed achievement\n */\n isAchievementCompletedByStudent(projectAchievement) {\n for (const satisfyCriterion of projectAchievement.satisfyCriteria) {\n if (!this.isCriterionSatisfied(satisfyCriterion)) {\n return false;\n }\n }\n return true;\n }\n\n isCriterionSatisfied(satisfyCriterion) {\n if (satisfyCriterion.name === 'isCompleted') {\n return this.completionService.isCompleted(\n satisfyCriterion.nodeId,\n satisfyCriterion.componentId\n );\n }\n return false;\n }\n\n /**\n * Create a listener for an aggregate achievement\n * @param projectAchievement the project achievement\n * @return the subscription object that we will use later to unsubscribe from the observable\n */\n createAggregateAchievementListener(projectAchievement) {\n const thisAchievementService = this;\n const thisAchievement = projectAchievement;\n this.debugOutput('registering ' + projectAchievement.id);\n return this.achievementCompleted$.subscribe((args: any) => {\n const projectAchievement = thisAchievement;\n if (projectAchievement != null) {\n this.debugOutput(\n 'createAggregateAchievementListener checking ' +\n projectAchievement.id +\n ' completed ' +\n args.achievementId\n );\n const id = projectAchievement.id;\n if (!this.isStudentAchievementExists(id)) {\n const completed = this.checkAggregateAchievement(projectAchievement);\n if (completed) {\n thisAchievementService.createStudentAchievement(projectAchievement);\n }\n }\n }\n });\n }\n\n /**\n * Check if the student completed a aggregate achievement\n * @param projectAchievement an aggregate achievement\n * @return whether the student completed the aggregate achievement\n */\n checkAggregateAchievement(projectAchievement) {\n const params = projectAchievement.params;\n if (params != null) {\n const achievementIds = params.achievementIds;\n for (const achievementId of achievementIds) {\n if (!this.isStudentAchievementExists(achievementId)) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * Get student achievements for a workgroup id\n * @param workgroupId the workgroup id\n * @return an array of student achievements completed by the workgroup\n */\n getStudentAchievementsByWorkgroupId(workgroupId = null) {\n if (workgroupId == null) {\n workgroupId = this.ConfigService.getWorkgroupId();\n }\n if (this.studentAchievementsByWorkgroupId[workgroupId] == null) {\n this.studentAchievementsByWorkgroupId[workgroupId] = [];\n return this.studentAchievementsByWorkgroupId[workgroupId];\n } else if (this.studentAchievementsByWorkgroupId[workgroupId] != null) {\n return this.studentAchievementsByWorkgroupId[workgroupId];\n }\n return [];\n }\n\n /**\n * Get an array of student projectAchievements for a given achievement id\n * @param achievementId a 10 character achievement id\n * @return an array of student projectAchievements. student projectAchievements are\n * created when a workgroup completes an achievement.\n */\n getStudentAchievementsByAchievementId(achievementId) {\n const achievementsByAchievementId = [];\n const workgroupIds = this.ConfigService.getClassmateWorkgroupIds();\n for (const workgroupId of workgroupIds) {\n const achievementsForWorkgroup = this.studentAchievementsByWorkgroupId[workgroupId];\n if (achievementsForWorkgroup != null) {\n for (let a = achievementsForWorkgroup.length - 1; a >= 0; a--) {\n const studentAchievement = achievementsForWorkgroup[a];\n if (studentAchievement != null && studentAchievement.data != null) {\n if (studentAchievement.achievementId === achievementId) {\n achievementsByAchievementId.push(studentAchievement);\n }\n }\n }\n }\n }\n return achievementsByAchievementId;\n }\n\n /**\n * Get a mapping from achievement id to array of student projectAchievements\n * @return a mapping from achievement id to array of student projectAchievements\n * student projectAchievements are created when a workgroup completes an achievement.\n */\n getAchievementIdToStudentAchievementsMappings() {\n const achievementIdToAchievements = {};\n const projectAchievements = this.ProjectService.getAchievementItems();\n for (const projectAchievement of projectAchievements) {\n const studentAchievements = this.getStudentAchievementsByAchievementId(projectAchievement.id);\n achievementIdToAchievements[projectAchievement.id] = studentAchievements;\n }\n return achievementIdToAchievements;\n }\n\n broadcastAchievementCompleted(args: any) {\n this.achievementCompletedSource.next(args);\n }\n\n broadcastNewStudentAchievement(achievement: any): void {\n this.newStudentAchievementSource.next(achievement);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "completionService",
+ "type": "CompletionService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "ProjectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "StudentDataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 18,
+ "jsdoctags": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "completionService",
+ "type": "CompletionService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "ProjectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "StudentDataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "AiChatService",
+ "id": "injectable-AiChatService-68e0c511d2d15926f0f94da7ed4a81fb9ddf514ac6f83db9c372224203124995e7789fe17423f6f496f7a31ea80c6f013c32ab473341640a2b373518456f3502",
+ "file": "src/assets/wise5/components/aiChat/aiChatService.ts",
+ "properties": [
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 17,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 13,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendChatMessage",
+ "args": [
+ {
+ "name": "messages",
+ "type": "AiChatMessage[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 27,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 134
+ ],
+ "jsdoctags": [
+ {
+ "name": "messages",
+ "type": "AiChatMessage[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "model",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 118,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the component state has student work. Sometimes a component\nstate may be created if the student visits a component but doesn't\nactually perform any work. This is where we will check if the student\nactually performed any work.\n",
+ "description": "Check if the component state has student work. Sometimes a component\nstate may be created if the student visits a component but doesn't\nactually perform any work. This is where we will check if the student\nactually performed any work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3634,
+ "end": 3648,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3628,
+ "end": 3633,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state object
\n"
+ },
+ {
+ "name": {
+ "pos": 3688,
+ "end": 3704,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3682,
+ "end": 3687,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3733,
+ "end": 3739,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the component state has any work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 84,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the component was completed\n",
+ "description": "Check if the component was completed
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2298,
+ "end": 2307,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2292,
+ "end": 2297,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component object
\n"
+ },
+ {
+ "name": {
+ "pos": 2341,
+ "end": 2356,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentStates"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2335,
+ "end": 2340,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component states for the specific component
\n"
+ },
+ {
+ "name": {
+ "pos": 2417,
+ "end": 2427,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeEvents"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2411,
+ "end": 2416,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the events for the parent node of the component
\n"
+ },
+ {
+ "name": {
+ "pos": 2488,
+ "end": 2492,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "node"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2482,
+ "end": 2487,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "parent node of the component
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2528,
+ "end": 2535,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether the component was completed
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { ComponentService } from '../componentService';\nimport { AiChatMessage } from './AiChatMessage';\nimport { AiChatMessageReponse } from './AiChatMessageResponse';\nimport { ComputerAvatarService } from '../../services/computerAvatarService';\n\n@Injectable()\nexport class AiChatService extends ComponentService {\n constructor(protected computerAvatarService: ComputerAvatarService) {\n super();\n }\n\n getComponentTypeLabel() {\n return $localize`AI Chat`;\n }\n\n createComponent(): any {\n const component: any = super.createComponent();\n component.type = 'AiChat';\n component.computerAvatarSettings = this.computerAvatarService.getDefaultComputerAvatarSettings();\n component.isComputerAvatarEnabled = false;\n component.model = 'gpt-4';\n component.systemPrompt = '';\n return component;\n }\n\n async sendChatMessage(messages: AiChatMessage[], model: string): Promise {\n const response = await fetch('/api/chat-gpt', {\n method: 'POST',\n body: JSON.stringify({\n messages: messages,\n model: model\n })\n });\n return response.json();\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "computerAvatarService",
+ "type": "ComputerAvatarService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 8,
+ "jsdoctags": [
+ {
+ "name": "computerAvatarService",
+ "type": "ComputerAvatarService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "AnimationService",
+ "id": "injectable-AnimationService-51fce50e09c3bb2d87825360498c07c1e9d77ce983b222e8aed9ef37aaee31fddd9c100b8424515c4ea3ddc28575716e69413c9637282f14d49e529a7f7f4ca2",
+ "file": "src/assets/wise5/components/animation/animationService.ts",
+ "properties": [
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 34,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 16,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 8,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getSvgId",
+ "args": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 12,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "'use strict';\n\nimport { ComponentService } from '../componentService';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class AnimationService extends ComponentService {\n getComponentTypeLabel(): string {\n return $localize`Animation`;\n }\n\n getSvgId(domIdEnding: string): string {\n return `svg-${domIdEnding}`;\n }\n\n createComponent() {\n const component: any = super.createComponent();\n component.type = 'Animation';\n component.widthInPixels = 600;\n component.widthInUnits = 60;\n component.heightInPixels = 200;\n component.heightInUnits = 20;\n component.dataXOriginInPixels = 0;\n component.dataYOriginInPixels = 80;\n component.coordinateSystem = 'screen';\n component.objects = [];\n return component;\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any) {\n return componentStates.length > 0;\n }\n\n componentStateHasStudentWork(componentState: any, componentContent: any) {\n if (componentState != null) {\n return componentState.studentData != null;\n }\n return false;\n }\n}\n",
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "AnnotationService",
+ "id": "injectable-AnnotationService-42325c3183c852b5397c8f6efc7df19444687805f70583f0466101bf3264b546174657869f5ff425adfb0c80ed85677f4e803a5f44f7389217ef481dba0a293c",
+ "file": "src/assets/wise5/services/annotationService.ts",
+ "properties": [
+ {
+ "name": "annotationReceived$",
+ "defaultValue": "this.annotationReceivedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 19,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "annotationReceivedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 18,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "annotations",
+ "defaultValue": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Annotation[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13
+ },
+ {
+ "name": "annotationSavedToServer$",
+ "defaultValue": "this.annotationSavedToServerSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "annotationSavedToServerSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "dummyAnnotationId",
+ "defaultValue": "1",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14
+ }
+ ],
+ "methods": [
+ {
+ "name": "addOrUpdateAnnotation",
+ "args": [
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 190,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastAnnotationReceived",
+ "args": [
+ {
+ "name": "annotation",
+ "type": "Annotation",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 617,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "annotation",
+ "type": "Annotation",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastAnnotationSavedToServer",
+ "args": [
+ {
+ "name": "annotation",
+ "type": "Annotation",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 613,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "annotation",
+ "type": "Annotation",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createAnnotation",
+ "args": [
+ {
+ "name": "annotationId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "runId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "fromWorkgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "toWorkgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentWorkId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "notebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotationType",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "data",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "clientSaveTime",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{ id: any; runId: any; periodId: any; fromWorkgroupId: any; toWorkgroupId: any; nodeId: any; componentId: any; studentWorkId: any; localNotebookItemId: any; notebookItemId: any; type: any; data: any; clientSaveTime: any; }",
+ "typeParameters": [],
+ "line": 75,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate an annotation object\n",
+ "description": "Create an annotation object
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2294,
+ "end": 2306,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotationId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2288,
+ "end": 2293,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation id
\n"
+ },
+ {
+ "name": {
+ "pos": 2337,
+ "end": 2342,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "runId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2331,
+ "end": 2336,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the run id
\n"
+ },
+ {
+ "name": {
+ "pos": 2366,
+ "end": 2374,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "periodId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2360,
+ "end": 2365,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the period id
\n"
+ },
+ {
+ "name": {
+ "pos": 2401,
+ "end": 2416,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "fromWorkgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2395,
+ "end": 2400,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the from workgroup id
\n"
+ },
+ {
+ "name": {
+ "pos": 2451,
+ "end": 2464,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "toWorkgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2445,
+ "end": 2450,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the to workgroup id
\n"
+ },
+ {
+ "name": {
+ "pos": 2497,
+ "end": 2503,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2491,
+ "end": 2496,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": {
+ "pos": 2528,
+ "end": 2539,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2522,
+ "end": 2527,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component id
\n"
+ },
+ {
+ "name": {
+ "pos": 2569,
+ "end": 2582,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "studentWorkId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2563,
+ "end": 2568,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student work id
\n"
+ },
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "notebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": {
+ "pos": 2615,
+ "end": 2629,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotationType"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2609,
+ "end": 2614,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation type
\n"
+ },
+ {
+ "name": {
+ "pos": 2662,
+ "end": 2666,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "data"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2656,
+ "end": 2661,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the data
\n"
+ },
+ {
+ "name": {
+ "pos": 2688,
+ "end": 2702,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "clientSaveTime"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2682,
+ "end": 2687,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the client save time
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2730,
+ "end": 2737,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "an annotation object
\n"
+ }
+ ]
+ },
+ {
+ "name": "createAutoCommentAnnotation",
+ "args": [
+ {
+ "name": "runId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "toWorkgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "data",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{ id: any; runId: any; periodId: any; fromWorkgroupId: any; toWorkgroupId: any; nodeId: any; componentId: any; studentWorkId: any; localNotebookItemId: any; notebookItemId: any; type: any; data: any; clientSaveTime: any; }",
+ "typeParameters": [],
+ "line": 320,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate an auto comment annotation\n",
+ "description": "Create an auto comment annotation
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 10822,
+ "end": 10827,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "runId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 10816,
+ "end": 10821,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the run id
\n"
+ },
+ {
+ "name": {
+ "pos": 10851,
+ "end": 10859,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "periodId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 10845,
+ "end": 10850,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the period id
\n"
+ },
+ {
+ "name": {
+ "pos": 10886,
+ "end": 10892,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 10880,
+ "end": 10885,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": {
+ "pos": 10917,
+ "end": 10928,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 10911,
+ "end": 10916,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component id
\n"
+ },
+ {
+ "name": {
+ "pos": 10958,
+ "end": 10971,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "toWorkgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 10952,
+ "end": 10957,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student workgroup id
\n"
+ },
+ {
+ "name": {
+ "pos": 11009,
+ "end": 11013,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "data"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 11003,
+ "end": 11008,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation data
\n"
+ },
+ {
+ "tagName": {
+ "pos": 11040,
+ "end": 11047,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the auto comment annotation
\n"
+ }
+ ]
+ },
+ {
+ "name": "createAutoScoreAnnotation",
+ "args": [
+ {
+ "name": "runId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "toWorkgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "data",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{ id: any; runId: any; periodId: any; fromWorkgroupId: any; toWorkgroupId: any; nodeId: any; componentId: any; studentWorkId: any; localNotebookItemId: any; notebookItemId: any; type: any; data: any; clientSaveTime: any; }",
+ "typeParameters": [],
+ "line": 284,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate an auto score annotation\n",
+ "description": "Create an auto score annotation
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 9829,
+ "end": 9834,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "runId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9823,
+ "end": 9828,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the run id
\n"
+ },
+ {
+ "name": {
+ "pos": 9858,
+ "end": 9866,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "periodId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9852,
+ "end": 9857,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the period id
\n"
+ },
+ {
+ "name": {
+ "pos": 9893,
+ "end": 9899,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9887,
+ "end": 9892,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": {
+ "pos": 9924,
+ "end": 9935,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9918,
+ "end": 9923,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component id
\n"
+ },
+ {
+ "name": {
+ "pos": 9965,
+ "end": 9978,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "toWorkgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9959,
+ "end": 9964,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student workgroup id
\n"
+ },
+ {
+ "name": {
+ "pos": 10016,
+ "end": 10020,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "data"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 10010,
+ "end": 10015,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation data
\n"
+ },
+ {
+ "tagName": {
+ "pos": 10047,
+ "end": 10054,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the auto score annotation
\n"
+ }
+ ]
+ },
+ {
+ "name": "createInappropriateFlagAnnotation",
+ "args": [
+ {
+ "name": "runId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "fromWorkgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "toWorkgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentWorkId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "data",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{ id: any; runId: any; periodId: any; fromWorkgroupId: any; toWorkgroupId: any; nodeId: any; componentId: any; studentWorkId: any; localNotebookItemId: any; notebookItemId: any; type: any; data: any; clientSaveTime: any; }",
+ "typeParameters": [],
+ "line": 358,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate an auto comment annotation\n",
+ "description": "Create an auto comment annotation
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 11821,
+ "end": 11826,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "runId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 11815,
+ "end": 11820,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the run id
\n"
+ },
+ {
+ "name": {
+ "pos": 11850,
+ "end": 11858,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "periodId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 11844,
+ "end": 11849,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the period id
\n"
+ },
+ {
+ "name": {
+ "pos": 11885,
+ "end": 11891,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 11879,
+ "end": 11884,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": {
+ "pos": 11916,
+ "end": 11927,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 11910,
+ "end": 11915,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component id
\n"
+ },
+ {
+ "name": {
+ "pos": 11957,
+ "end": 11972,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "fromWorkgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 11951,
+ "end": 11956,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the teacher workgroup id
\n"
+ },
+ {
+ "name": {
+ "pos": 12010,
+ "end": 12023,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "toWorkgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 12004,
+ "end": 12009,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student workgroup id
\n"
+ },
+ {
+ "name": {
+ "pos": 12061,
+ "end": 12074,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "studentWorkId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 12055,
+ "end": 12060,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state id
\n"
+ },
+ {
+ "name": {
+ "pos": 12110,
+ "end": 12114,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "data"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 12104,
+ "end": 12109,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation data
\n"
+ },
+ {
+ "tagName": {
+ "pos": 12141,
+ "end": 12148,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the inappropriate flag annotation
\n"
+ }
+ ]
+ },
+ {
+ "name": "getAnnotationById",
+ "args": [
+ {
+ "name": "annotationId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Annotation",
+ "typeParameters": [],
+ "line": 31,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "annotationId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAnnotations",
+ "args": [],
+ "optional": false,
+ "returnType": "Annotation[]",
+ "typeParameters": [],
+ "line": 27,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getAnnotationsByNodeIdComponentId",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Annotation[]",
+ "typeParameters": [],
+ "line": 35,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAnnotationsByStudentWorkId",
+ "args": [
+ {
+ "name": "studentWorkId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Annotation[]",
+ "typeParameters": [],
+ "line": 609,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the annotations for the given student work\n",
+ "description": "Get the annotations for the given student work
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 20093,
+ "end": 20106,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "studentWorkId"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 20087,
+ "end": 20092,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student work id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 20133,
+ "end": 20139,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "array of annotations for the given student work
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLatestAnnotation",
+ "args": [
+ {
+ "name": "params",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 46,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the latest annotation with the given params\n",
+ "description": "Get the latest annotation with the given params
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 1694,
+ "end": 1700,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "params"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1688,
+ "end": 1693,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an object containing the params to match
\n"
+ },
+ {
+ "tagName": {
+ "pos": 1748,
+ "end": 1755,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the latest annotation that matches the params
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLatestAnnotationByStudentWorkIdAndType",
+ "args": [
+ {
+ "name": "studentWorkId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "type",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Annotation",
+ "typeParameters": [],
+ "line": 594,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the latest annotation for the given student work and annotation type\n",
+ "description": "Get the latest annotation for the given student work and annotation type
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 19570,
+ "end": 19583,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "studentWorkId"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 19564,
+ "end": 19569,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student work id
\n"
+ },
+ {
+ "name": {
+ "pos": 19616,
+ "end": 19620,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "type"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 19610,
+ "end": 19615,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the type of annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 19650,
+ "end": 19656,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "the latest annotation for the given student work and annotation type
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLatestAutoCommentAnnotationByStudentWorkId",
+ "args": [
+ {
+ "name": "studentWorkId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Annotation",
+ "typeParameters": [],
+ "line": 584,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the latest auto comment annotation for a student work id\n",
+ "description": "Get the latest auto comment annotation for a student work id
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 19206,
+ "end": 19219,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "studentWorkId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 19200,
+ "end": 19205,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student work id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 19246,
+ "end": 19252,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "the latest auto comment annotation for the student work
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLatestAutoScoreAnnotationByStudentWorkId",
+ "args": [
+ {
+ "name": "studentWorkId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Annotation",
+ "typeParameters": [],
+ "line": 575,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the latest auto score annotation for a student work id\n",
+ "description": "Get the latest auto score annotation for a student work id
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 18860,
+ "end": 18873,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "studentWorkId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 18854,
+ "end": 18859,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student work id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 18900,
+ "end": 18906,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "the latest auto score annotation for the student work
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLatestCommentAnnotation",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "commentType",
+ "type": "\"comment\" | \"autoComment\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "'any'"
+ }
+ ],
+ "optional": false,
+ "returnType": "Annotation",
+ "typeParameters": [],
+ "line": 512,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "commentType",
+ "type": "\"comment\" | \"autoComment\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "'any'",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getLatestComponentAnnotations",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "scoreType",
+ "type": "\"score\" | \"autoScore\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "'any'"
+ },
+ {
+ "name": "commentType",
+ "type": "\"comment\" | \"autoComment\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "'any'"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 408,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the latest annotations for a given component (as an object)\ne.g.\n'autoScore' for auto graded score\n'score' for teacher graded score\n'any' for auto graded score or teacher graded score\ne.g.\n'autoComment' for auto graded comment\n'comment' for teacher graded comment\n'any' for auto graded comment or teacher graded comment\n",
+ "description": "Get the latest annotations for a given component (as an object)\ne.g.\n'autoScore' for auto graded score\n'score' for teacher graded score\n'any' for auto graded score or teacher graded score\ne.g.\n'autoComment' for auto graded comment\n'comment' for teacher graded comment\n'any' for auto graded comment or teacher graded comment
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 12972,
+ "end": 12978,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 12966,
+ "end": 12971,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": {
+ "pos": 13003,
+ "end": 13014,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 12997,
+ "end": 13002,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component id
\n"
+ },
+ {
+ "name": {
+ "pos": 13044,
+ "end": 13055,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 13038,
+ "end": 13043,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the workgroup id
\n"
+ },
+ {
+ "name": {
+ "pos": 13085,
+ "end": 13094,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "scoreType"
+ },
+ "type": "\"score\" | \"autoScore\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "'any'",
+ "tagName": {
+ "pos": 13079,
+ "end": 13084,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the type of score\ne.g.\n'autoScore' for auto graded score\n'score' for teacher graded score\n'any' for auto graded score or teacher graded score
\n"
+ },
+ {
+ "name": {
+ "pos": 13280,
+ "end": 13291,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "commentType"
+ },
+ "type": "\"comment\" | \"autoComment\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "'any'",
+ "tagName": {
+ "pos": 13274,
+ "end": 13279,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the type of comment\ne.g.\n'autoComment' for auto graded comment\n'comment' for teacher graded comment\n'any' for auto graded comment or teacher graded comment
\n"
+ },
+ {
+ "tagName": {
+ "pos": 13485,
+ "end": 13491,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "object containing the component's latest score and comment annotations
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLatestNotebookItemAnnotations",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{ score: any; comment: any; }",
+ "typeParameters": [],
+ "line": 426,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the latest annotations for a given notebook item (as an object)\n",
+ "description": "Get the latest annotations for a given notebook item (as an object)
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 14095,
+ "end": 14106,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14089,
+ "end": 14094,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the workgroup id that did the notebook
\n"
+ },
+ {
+ "name": {
+ "pos": 14158,
+ "end": 14177,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "localNotebookItemId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14152,
+ "end": 14157,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "unique id for note and its revisions ["finalReport", "xyzabc", ...]
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLatestNotebookItemCommentAnnotation",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 470,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the latest comment annotation for this workgroup and localNotebookItemId, or null if not found\n",
+ "description": "Get the latest comment annotation for this workgroup and localNotebookItemId, or null if not found
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 15627,
+ "end": 15638,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 15621,
+ "end": 15626,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the workgroup id that did the notebook
\n"
+ },
+ {
+ "name": {
+ "pos": 15690,
+ "end": 15709,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "localNotebookItemId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 15684,
+ "end": 15689,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "unique id for note and its revisions ["finalReport", "xyzabc", ...]
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLatestNotebookItemScoreAnnotation",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 449,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the latest score annotation for this workgroup and localNotebookItemId, or null if not found\n",
+ "description": "Get the latest score annotation for this workgroup and localNotebookItemId, or null if not found
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 14872,
+ "end": 14883,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14866,
+ "end": 14871,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the workgroup id that did the notebook
\n"
+ },
+ {
+ "name": {
+ "pos": 14935,
+ "end": 14954,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "localNotebookItemId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14929,
+ "end": 14934,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "unique id for note and its revisions ["finalReport", "xyzabc", ...]
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLatestScoreAnnotation",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "scoreType",
+ "type": "\"score\" | \"autoScore\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "'any'"
+ }
+ ],
+ "optional": false,
+ "returnType": "Annotation",
+ "typeParameters": [],
+ "line": 486,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "scoreType",
+ "type": "\"score\" | \"autoScore\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "'any'",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getLatestTeacherCommentAnnotationByStudentWorkId",
+ "args": [
+ {
+ "name": "studentWorkId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Annotation",
+ "typeParameters": [],
+ "line": 566,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the latest teacher comment annotation for a student work id\n",
+ "description": "Get the latest teacher comment annotation for a student work id
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 18508,
+ "end": 18521,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "studentWorkId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 18502,
+ "end": 18507,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student work id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 18548,
+ "end": 18554,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "the latest teacher comment annotation for the student work
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLatestTeacherScoreAnnotationByStudentWorkId",
+ "args": [
+ {
+ "name": "studentWorkId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Annotation",
+ "typeParameters": [],
+ "line": 557,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the latest teacher score annotation for a student work id\n",
+ "description": "Get the latest teacher score annotation for a student work id
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 18157,
+ "end": 18170,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "studentWorkId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 18151,
+ "end": 18156,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student work id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 18197,
+ "end": 18203,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "the latest teacher score annotation for the student work
\n"
+ }
+ ]
+ },
+ {
+ "name": "getScoreAnnotations",
+ "args": [
+ {
+ "name": "annotations",
+ "type": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 243,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "annotations",
+ "type": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getScoreValueFromScoreAnnotation",
+ "args": [
+ {
+ "name": "scoreAnnotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 539,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "scoreAnnotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getSubScoreValueFromScoreAnnotation",
+ "args": [
+ {
+ "name": "scoreAnnotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "scoreId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "''"
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 543,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "scoreAnnotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "scoreId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "''",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getTotalNodeScore",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "Node",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "components",
+ "type": "ComponentContent[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 256,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "Node",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "components",
+ "type": "ComponentContent[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getTotalNodeScoreForWorkgroup",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 267,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getTotalScore",
+ "args": [
+ {
+ "name": "annotations",
+ "type": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]"
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 228,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "annotations",
+ "type": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isAnnotationMatch",
+ "args": [
+ {
+ "name": "annotation1",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation2",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 206,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "annotation1",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "annotation2",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isScoreOrAutoScore",
+ "args": [
+ {
+ "name": "annotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 252,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "annotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "matchesCommentType",
+ "args": [
+ {
+ "name": "annotation",
+ "type": "Annotation",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "commentType",
+ "type": "\"comment\" | \"autoComment\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 529,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "annotation",
+ "type": "Annotation",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "commentType",
+ "type": "\"comment\" | \"autoComment\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "matchesScoreType",
+ "args": [
+ {
+ "name": "annotation",
+ "type": "Annotation",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "scoreType",
+ "type": "\"score\" | \"autoScore\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 502,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "annotation",
+ "type": "Annotation",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "scoreType",
+ "type": "\"score\" | \"autoScore\" | \"any\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "saveAnnotation",
+ "args": [
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 112,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nSave the annotation to the server\n",
+ "description": "Save the annotation to the server
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3503,
+ "end": 3513,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3497,
+ "end": 3502,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation object
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3542,
+ "end": 3549,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "a promise
\n"
+ }
+ ]
+ },
+ {
+ "name": "saveToServerSuccess",
+ "args": [
+ {
+ "name": "savedAnnotationDataResponse",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 141,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "savedAnnotationDataResponse",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setAnnotations",
+ "args": [
+ {
+ "name": "annotations",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 224,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nSet the annotations\n",
+ "description": "Set the annotations
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 7972,
+ "end": 7983,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotations"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 7966,
+ "end": 7971,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotations aray
\n"
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { ProjectService } from './projectService';\nimport { ConfigService } from './configService';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Observable, Subject } from 'rxjs';\nimport { generateRandomKey } from '../common/string/string';\nimport { Annotation } from '../common/Annotation';\nimport { Node } from '../common/Node';\nimport { ComponentContent } from '../common/ComponentContent';\n\n@Injectable()\nexport class AnnotationService {\n annotations: Annotation[] = [];\n dummyAnnotationId: number = 1; // used in preview mode when we simulate saving of annotation\n private annotationSavedToServerSource: Subject = new Subject();\n public annotationSavedToServer$: Observable =\n this.annotationSavedToServerSource.asObservable();\n private annotationReceivedSource: Subject = new Subject();\n public annotationReceived$: Observable = this.annotationReceivedSource.asObservable();\n\n constructor(\n private configService: ConfigService,\n private http: HttpClient,\n private projectService: ProjectService\n ) {}\n\n getAnnotations(): Annotation[] {\n return this.annotations;\n }\n\n getAnnotationById(annotationId: number): Annotation {\n return this.annotations.find((annotation) => annotation.id === annotationId) || null;\n }\n\n getAnnotationsByNodeIdComponentId(nodeId: string, componentId: string): Annotation[] {\n return this.annotations.filter(\n (annotation) => annotation.nodeId === nodeId && annotation.componentId === componentId\n );\n }\n\n /**\n * Get the latest annotation with the given params\n * @param params an object containing the params to match\n * @returns the latest annotation that matches the params\n */\n getLatestAnnotation(params): any {\n return (\n this.annotations.findLast((annotation) => {\n return (\n annotation.nodeId == params.nodeId &&\n annotation.componentId == params.componentId &&\n ((params.type.constructor === Array &&\n params.type.every((thisType) => annotation.type === thisType)) ||\n annotation.type === params.type)\n );\n }) ?? null\n );\n }\n\n /**\n * Create an annotation object\n * @param annotationId the annotation id\n * @param runId the run id\n * @param periodId the period id\n * @param fromWorkgroupId the from workgroup id\n * @param toWorkgroupId the to workgroup id\n * @param nodeId the node id\n * @param componentId the component id\n * @param studentWorkId the student work id\n * @param annotationType the annotation type\n * @param data the data\n * @param clientSaveTime the client save time\n * @returns an annotation object\n */\n createAnnotation(\n annotationId,\n runId,\n periodId,\n fromWorkgroupId,\n toWorkgroupId,\n nodeId,\n componentId,\n studentWorkId,\n localNotebookItemId,\n notebookItemId,\n annotationType,\n data,\n clientSaveTime\n ) {\n return {\n id: annotationId,\n runId: runId,\n periodId: periodId,\n fromWorkgroupId: fromWorkgroupId,\n toWorkgroupId: toWorkgroupId,\n nodeId: nodeId,\n componentId: componentId,\n studentWorkId: studentWorkId,\n localNotebookItemId: localNotebookItemId,\n notebookItemId: notebookItemId,\n type: annotationType,\n data: data,\n clientSaveTime: clientSaveTime\n };\n }\n\n /**\n * Save the annotation to the server\n * @param annotation the annotation object\n * @returns a promise\n */\n saveAnnotation(annotation) {\n annotation.requestToken = generateRandomKey(); // use this to keep track of unsaved annotations.\n this.addOrUpdateAnnotation(annotation);\n const annotations = [annotation];\n if (this.configService.isPreview()) {\n // if we're in preview, don't make any request to the server but pretend we did\n let savedAnnotationDataResponse = {\n annotations: annotations\n };\n let annotation = this.saveToServerSuccess(savedAnnotationDataResponse);\n return Promise.resolve(annotation);\n } else {\n const params = {\n runId: this.configService.getRunId(),\n workgroupId: this.configService.getWorkgroupId(),\n annotations: JSON.stringify(annotations)\n };\n const headers = new HttpHeaders({ 'Content-Type': 'application/x-www-form-urlencoded' });\n return this.http\n .post(this.configService.getConfigParam('teacherDataURL'), $.param(params), {\n headers: headers\n })\n .toPromise()\n .then((savedAnnotationDataResponse: any) => {\n return this.saveToServerSuccess(savedAnnotationDataResponse);\n });\n }\n }\n\n saveToServerSuccess(savedAnnotationDataResponse) {\n let localAnnotation = null;\n if (savedAnnotationDataResponse != null) {\n let savedAnnotations = savedAnnotationDataResponse.annotations;\n let localAnnotations = this.annotations;\n if (savedAnnotations != null && localAnnotations != null) {\n for (let savedAnnotation of savedAnnotations) {\n for (let y = localAnnotations.length - 1; y >= 0; y--) {\n localAnnotation = localAnnotations[y];\n\n if (localAnnotation.id != null && localAnnotation.id === savedAnnotation.id) {\n // we have found the matching local annotation so we will update it\n localAnnotation.serverSaveTime = savedAnnotation.serverSaveTime;\n //localAnnotation.requestToken = null; // requestToken is no longer needed.\n\n this.broadcastAnnotationSavedToServer(localAnnotation);\n break;\n } else if (\n localAnnotation.requestToken != null &&\n localAnnotation.requestToken === savedAnnotation.requestToken\n ) {\n // we have found the matching local annotation so we will update it\n localAnnotation.id = savedAnnotation.id;\n localAnnotation.serverSaveTime = savedAnnotation.serverSaveTime;\n localAnnotation.requestToken = null; // requestToken is no longer needed.\n\n if (this.configService.isPreview() && localAnnotation.id == null) {\n /*\n * we are in preview mode so we will set a dummy\n * annotation id into the annotation\n */\n localAnnotation.id = this.dummyAnnotationId;\n /*\n * increment the dummy annotation id for the next\n * annotation\n */\n this.dummyAnnotationId++;\n }\n\n this.broadcastAnnotationSavedToServer(localAnnotation);\n break;\n }\n }\n }\n }\n }\n return localAnnotation;\n }\n\n addOrUpdateAnnotation(annotation) {\n let isAnnotationFound = false;\n for (let a = this.annotations.length - 1; a >= 0; a--) {\n const localAnnotation = this.annotations[a];\n if (this.isAnnotationMatch(annotation, localAnnotation)) {\n isAnnotationFound = true;\n localAnnotation.data = annotation.data;\n localAnnotation.clientSaveTime = annotation.clientSaveTime;\n localAnnotation.serverSaveTime = annotation.serverSaveTime;\n }\n }\n if (!isAnnotationFound) {\n this.annotations.push(annotation);\n }\n }\n\n isAnnotationMatch(annotation1, annotation2) {\n return (\n annotation1.id === annotation2.id &&\n annotation1.nodeId === annotation2.nodeId &&\n annotation1.componentId === annotation2.componentId &&\n annotation1.fromWorkgroupId === annotation2.fromWorkgroupId &&\n annotation1.toWorkgroupId === annotation2.toWorkgroupId &&\n annotation1.type === annotation2.type &&\n annotation1.studentWorkId === annotation2.studentWorkId &&\n annotation1.runId === annotation2.runId &&\n annotation1.periodId === annotation2.periodId\n );\n }\n\n /**\n * Set the annotations\n * @param annotations the annotations aray\n */\n setAnnotations(annotations) {\n this.annotations = annotations;\n }\n\n getTotalScore(annotations = []) {\n let totalScore: number = null;\n const scoresFound = []; // to prevent double counting if teacher scored component multiple times\n const scoreAnnotations = this.getScoreAnnotations(annotations);\n for (let i = scoreAnnotations.length - 1; i >= 0; i--) {\n const annotation = scoreAnnotations[i];\n const component = `${annotation.nodeId}-${annotation.componentId}`;\n if (!scoresFound.includes(component)) {\n totalScore += annotation.data.value;\n scoresFound.push(component);\n }\n }\n return totalScore;\n }\n\n getScoreAnnotations(annotations = []) {\n return annotations.filter((annotation) => {\n return (\n this.isScoreOrAutoScore(annotation) &&\n this.projectService.shouldIncludeInTotalScore(annotation.nodeId, annotation.componentId)\n );\n });\n }\n\n isScoreOrAutoScore(annotation: any): boolean {\n return annotation.type === 'score' || annotation.type === 'autoScore';\n }\n\n getTotalNodeScore(workgroupId: number, node: Node, components: ComponentContent[]): number {\n return this.getTotalScore(\n this.annotations.filter(\n (annotation) =>\n annotation.nodeId === node.id &&\n annotation.toWorkgroupId === workgroupId &&\n components.some((component) => component.id === annotation.componentId)\n )\n );\n }\n\n getTotalNodeScoreForWorkgroup(workgroupId: number, nodeId: string) {\n const annotationsForNodeAndWorkgroup = this.annotations.filter((annotation) => {\n return annotation.nodeId === nodeId && annotation.toWorkgroupId === workgroupId;\n });\n return this.getTotalScore(annotationsForNodeAndWorkgroup);\n }\n\n /**\n * Create an auto score annotation\n * @param runId the run id\n * @param periodId the period id\n * @param nodeId the node id\n * @param componentId the component id\n * @param toWorkgroupId the student workgroup id\n * @param data the annotation data\n * @returns the auto score annotation\n */\n createAutoScoreAnnotation(runId, periodId, nodeId, componentId, toWorkgroupId, data) {\n const annotationId = null;\n const fromWorkgroupId = null;\n const studentWorkId = null;\n const localNotebookItemId = null;\n const notebookItemId = null;\n const annotationType = 'autoScore';\n const clientSaveTime = new Date().getTime();\n const annotation = this.createAnnotation(\n annotationId,\n runId,\n periodId,\n fromWorkgroupId,\n toWorkgroupId,\n nodeId,\n componentId,\n studentWorkId,\n localNotebookItemId,\n notebookItemId,\n annotationType,\n data,\n clientSaveTime\n );\n return annotation;\n }\n\n /**\n * Create an auto comment annotation\n * @param runId the run id\n * @param periodId the period id\n * @param nodeId the node id\n * @param componentId the component id\n * @param toWorkgroupId the student workgroup id\n * @param data the annotation data\n * @returns the auto comment annotation\n */\n createAutoCommentAnnotation(runId, periodId, nodeId, componentId, toWorkgroupId, data) {\n const annotationId = null;\n const fromWorkgroupId = null;\n const studentWorkId = null;\n const localNotebookItemId = null;\n const notebookItemId = null;\n const annotationType = 'autoComment';\n const clientSaveTime = new Date().getTime();\n const annotation = this.createAnnotation(\n annotationId,\n runId,\n periodId,\n fromWorkgroupId,\n toWorkgroupId,\n nodeId,\n componentId,\n studentWorkId,\n localNotebookItemId,\n notebookItemId,\n annotationType,\n data,\n clientSaveTime\n );\n return annotation;\n }\n\n /**\n * Create an auto comment annotation\n * @param runId the run id\n * @param periodId the period id\n * @param nodeId the node id\n * @param componentId the component id\n * @param fromWorkgroupId the teacher workgroup id\n * @param toWorkgroupId the student workgroup id\n * @param studentWorkId the component state id\n * @param data the annotation data\n * @returns the inappropriate flag annotation\n */\n createInappropriateFlagAnnotation(\n runId,\n periodId,\n nodeId,\n componentId,\n fromWorkgroupId,\n toWorkgroupId,\n studentWorkId,\n data\n ) {\n const annotationId = null;\n const localNotebookItemId = null;\n const notebookItemId = null;\n const annotationType = 'inappropriateFlag';\n const clientSaveTime = new Date().getTime();\n const annotation = this.createAnnotation(\n annotationId,\n runId,\n periodId,\n fromWorkgroupId,\n toWorkgroupId,\n nodeId,\n componentId,\n studentWorkId,\n localNotebookItemId,\n notebookItemId,\n annotationType,\n data,\n clientSaveTime\n );\n return annotation;\n }\n\n /**\n * Get the latest annotations for a given component (as an object)\n * @param nodeId the node id\n * @param componentId the component id\n * @param workgroupId the workgroup id\n * @param scoreType (optional) the type of score\n * e.g.\n * 'autoScore' for auto graded score\n * 'score' for teacher graded score\n * 'any' for auto graded score or teacher graded score\n * @param commentType (optional) the type of comment\n * e.g.\n * 'autoComment' for auto graded comment\n * 'comment' for teacher graded comment\n * 'any' for auto graded comment or teacher graded comment\n * @return object containing the component's latest score and comment annotations\n */\n getLatestComponentAnnotations(\n nodeId: string,\n componentId: string,\n workgroupId: number,\n scoreType: 'score' | 'autoScore' | 'any' = 'any',\n commentType: 'comment' | 'autoComment' | 'any' = 'any'\n ): any {\n return {\n score: this.getLatestScoreAnnotation(nodeId, componentId, workgroupId, scoreType),\n comment: this.getLatestCommentAnnotation(nodeId, componentId, workgroupId, commentType)\n };\n }\n\n /**\n * Get the latest annotations for a given notebook item (as an object)\n * @param workgroupId the workgroup id that did the notebook\n * @param localNotebookItemId unique id for note and its revisions [\"finalReport\", \"xyzabc\", ...]\n */\n getLatestNotebookItemAnnotations(workgroupId, localNotebookItemId) {\n let latestScoreAnnotation = null;\n let latestCommentAnnotation = null;\n latestScoreAnnotation = this.getLatestNotebookItemScoreAnnotation(\n workgroupId,\n localNotebookItemId\n );\n latestCommentAnnotation = this.getLatestNotebookItemCommentAnnotation(\n workgroupId,\n localNotebookItemId\n );\n\n return {\n score: latestScoreAnnotation,\n comment: latestCommentAnnotation\n };\n }\n\n /**\n * Get the latest score annotation for this workgroup and localNotebookItemId, or null if not found\n * @param workgroupId the workgroup id that did the notebook\n * @param localNotebookItemId unique id for note and its revisions [\"finalReport\", \"xyzabc\", ...]\n */\n getLatestNotebookItemScoreAnnotation(workgroupId, localNotebookItemId) {\n let annotations = this.getAnnotations();\n for (let a = annotations.length - 1; a >= 0; a--) {\n let annotation = annotations[a];\n if (\n annotation != null &&\n annotation.type === 'score' &&\n annotation.notebookItemId != null &&\n annotation.localNotebookItemId === localNotebookItemId\n ) {\n return annotation;\n }\n }\n return null;\n }\n\n /**\n * Get the latest comment annotation for this workgroup and localNotebookItemId, or null if not found\n * @param workgroupId the workgroup id that did the notebook\n * @param localNotebookItemId unique id for note and its revisions [\"finalReport\", \"xyzabc\", ...]\n */\n getLatestNotebookItemCommentAnnotation(workgroupId, localNotebookItemId) {\n let annotations = this.getAnnotations();\n for (let a = annotations.length - 1; a >= 0; a--) {\n let annotation = annotations[a];\n if (\n annotation != null &&\n annotation.type === 'comment' &&\n annotation.notebookItemId != null &&\n annotation.localNotebookItemId === localNotebookItemId\n ) {\n return annotation;\n }\n }\n return null;\n }\n\n getLatestScoreAnnotation(\n nodeId: string,\n componentId: string,\n workgroupId: number,\n scoreType: 'score' | 'autoScore' | 'any' = 'any'\n ): Annotation {\n return (\n this.getAnnotationsByNodeIdComponentId(nodeId, componentId)\n .filter(\n (annotation) =>\n annotation.toWorkgroupId == workgroupId && this.matchesScoreType(annotation, scoreType)\n )\n .at(-1) || null\n );\n }\n\n private matchesScoreType(\n annotation: Annotation,\n scoreType: 'score' | 'autoScore' | 'any'\n ): boolean {\n return (\n (scoreType === 'any' && ['autoScore', 'score'].includes(annotation.type)) ||\n annotation.type === scoreType\n );\n }\n\n getLatestCommentAnnotation(\n nodeId: string,\n componentId: string,\n workgroupId: number,\n commentType: 'comment' | 'autoComment' | 'any' = 'any'\n ): Annotation {\n return (\n this.getAnnotationsByNodeIdComponentId(nodeId, componentId)\n .filter(\n (annotation) =>\n annotation.toWorkgroupId == workgroupId &&\n this.matchesCommentType(annotation, commentType)\n )\n .at(-1) || null\n );\n }\n\n private matchesCommentType(\n annotation: Annotation,\n commentType: 'comment' | 'autoComment' | 'any'\n ): boolean {\n return (\n (commentType === 'any' && ['autoComment', 'comment'].includes(annotation.type)) ||\n annotation.type === commentType\n );\n }\n\n getScoreValueFromScoreAnnotation(scoreAnnotation: any): number {\n return scoreAnnotation.data.value;\n }\n\n getSubScoreValueFromScoreAnnotation(scoreAnnotation: any, scoreId: string = ''): number {\n for (const scoreObject of scoreAnnotation.data.scores) {\n if (scoreObject.id === scoreId) {\n return scoreObject.score;\n }\n }\n return null;\n }\n\n /**\n * Get the latest teacher score annotation for a student work id\n * @param studentWorkId the student work id\n * @return the latest teacher score annotation for the student work\n */\n getLatestTeacherScoreAnnotationByStudentWorkId(studentWorkId) {\n return this.getLatestAnnotationByStudentWorkIdAndType(studentWorkId, 'score');\n }\n\n /**\n * Get the latest teacher comment annotation for a student work id\n * @param studentWorkId the student work id\n * @return the latest teacher comment annotation for the student work\n */\n getLatestTeacherCommentAnnotationByStudentWorkId(studentWorkId) {\n return this.getLatestAnnotationByStudentWorkIdAndType(studentWorkId, 'comment');\n }\n\n /**\n * Get the latest auto score annotation for a student work id\n * @param studentWorkId the student work id\n * @return the latest auto score annotation for the student work\n */\n getLatestAutoScoreAnnotationByStudentWorkId(studentWorkId) {\n return this.getLatestAnnotationByStudentWorkIdAndType(studentWorkId, 'autoScore');\n }\n\n /**\n * Get the latest auto comment annotation for a student work id\n * @param studentWorkId the student work id\n * @return the latest auto comment annotation for the student work\n */\n getLatestAutoCommentAnnotationByStudentWorkId(studentWorkId) {\n return this.getLatestAnnotationByStudentWorkIdAndType(studentWorkId, 'autoComment');\n }\n\n /**\n * Get the latest annotation for the given student work and annotation type\n * @param studentWorkId the student work id\n * @param type the type of annotation\n * @return the latest annotation for the given student work and annotation type\n */\n getLatestAnnotationByStudentWorkIdAndType(studentWorkId: number, type: string): Annotation {\n return (\n this.annotations\n .filter(\n (annotation) => annotation.studentWorkId === studentWorkId && annotation.type === type\n )\n .at(-1) || null\n );\n }\n\n /**\n * Get the annotations for the given student work\n * @param studentWorkId the student work id\n * @return array of annotations for the given student work\n */\n getAnnotationsByStudentWorkId(studentWorkId: number): Annotation[] {\n return this.annotations.filter((annotation) => annotation.studentWorkId === studentWorkId);\n }\n\n broadcastAnnotationSavedToServer(annotation: Annotation): void {\n this.annotationSavedToServerSource.next(annotation);\n }\n\n broadcastAnnotationReceived(annotation: Annotation): void {\n this.annotationReceivedSource.next(annotation);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 19,
+ "jsdoctags": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "ArchiveProjectService",
+ "id": "injectable-ArchiveProjectService-7ea852d0e1094797615a3709ab4762672e2e4e36c798ae07bb09789e9898633cdc7ab0a7221e98c4f96ec6feced9b106759f927bf10131f8ac8a8c76df9a4ecf",
+ "file": "src/app/services/archive-project.service.ts",
+ "properties": [
+ {
+ "name": "refreshProjectsEvent$",
+ "defaultValue": "this.refreshProjectsEventSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "refreshProjectsEventSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "archiveProject",
+ "args": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "archive",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 16,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "archive",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "archiveProjects",
+ "args": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "archive",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Subscription",
+ "typeParameters": [],
+ "line": 71,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "archive",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "makeArchiveProjectRequest",
+ "args": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 28,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "makeArchiveProjectsRequest",
+ "args": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 85,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "makeUnarchiveProjectRequest",
+ "args": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "makeUnarchiveProjectsRequest",
+ "args": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 90,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "openSuccessSnackBar",
+ "args": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "archiveProjectsResponse",
+ "type": "ArchiveProjectResponse[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "archived",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 111,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "archiveProjectsResponse",
+ "type": "ArchiveProjectResponse[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "archived",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "refreshProjects",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 154,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "showArchiveProjectErrorMessage",
+ "args": [
+ {
+ "name": "archive",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 65,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "archive",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "showArchiveProjectSuccessMessage",
+ "args": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "archive",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 41,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "archive",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "showErrorSnackBar",
+ "args": [
+ {
+ "name": "archive",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 148,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "archive",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "undoArchiveAction",
+ "args": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "archiveFunctionName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "archiveFunctionName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "undoArchiveProjectAction",
+ "args": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "archiveFunctionName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 53,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "archiveFunctionName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateProjectArchivedStatus",
+ "args": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "archived",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "tag",
+ "type": "Tag",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 36,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "project",
+ "type": "Project",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "archived",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "tag",
+ "type": "Tag",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateProjectsArchivedStatus",
+ "args": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "archiveProjectsResponse",
+ "type": "ArchiveProjectResponse[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 100,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "projects",
+ "type": "Project[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "archiveProjectsResponse",
+ "type": "ArchiveProjectResponse[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable, Subject, Subscription } from 'rxjs';\nimport { Project } from '../domain/project';\nimport { ArchiveProjectResponse } from '../domain/archiveProjectResponse';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { Tag } from '../domain/tag';\n\n@Injectable()\nexport class ArchiveProjectService {\n private refreshProjectsEventSource: Subject = new Subject();\n public refreshProjectsEvent$ = this.refreshProjectsEventSource.asObservable();\n\n constructor(private http: HttpClient, private snackBar: MatSnackBar) {}\n\n archiveProject(project: Project, archive: boolean): void {\n this[archive ? 'makeArchiveProjectRequest' : 'makeUnarchiveProjectRequest'](project).subscribe({\n next: (response: ArchiveProjectResponse) => {\n this.updateProjectArchivedStatus(project, response.archived, response.tag);\n this.showArchiveProjectSuccessMessage(project, archive);\n },\n error: () => {\n this.showArchiveProjectErrorMessage(archive);\n }\n });\n }\n\n private makeArchiveProjectRequest(project: Project): Observable {\n return this.http.put(`/api/project/${project.id}/archived`, null);\n }\n\n private makeUnarchiveProjectRequest(project: Project): Observable {\n return this.http.delete(`/api/project/${project.id}/archived`);\n }\n\n private updateProjectArchivedStatus(project: Project, archived: boolean, tag: Tag): void {\n project.updateArchivedStatus(archived, tag);\n this.refreshProjects();\n }\n\n private showArchiveProjectSuccessMessage(project: Project, archive: boolean): void {\n this.snackBar\n .open($localize`Successfully ${archive ? 'archived' : 'restored'} unit.`, $localize`Undo`)\n .onAction()\n .subscribe(() => {\n this.undoArchiveProjectAction(\n project,\n archive ? 'makeUnarchiveProjectRequest' : 'makeArchiveProjectRequest'\n );\n });\n }\n\n private undoArchiveProjectAction(project: Project, archiveFunctionName: string): void {\n this[archiveFunctionName](project).subscribe({\n next: (response: ArchiveProjectResponse) => {\n this.updateProjectArchivedStatus(project, response.archived, response.tag);\n this.snackBar.open($localize`Action undone.`);\n },\n error: () => {\n this.snackBar.open($localize`Error undoing action.`);\n }\n });\n }\n\n private showArchiveProjectErrorMessage(archive: boolean): void {\n this.snackBar.open(\n archive ? $localize`Error archiving unit.` : $localize`Error restoring unit.`\n );\n }\n\n archiveProjects(projects: Project[], archive: boolean): Subscription {\n return this[archive ? 'makeArchiveProjectsRequest' : 'makeUnarchiveProjectsRequest'](\n projects\n ).subscribe({\n next: (archiveProjectsResponse: ArchiveProjectResponse[]) => {\n this.updateProjectsArchivedStatus(projects, archiveProjectsResponse);\n this.openSuccessSnackBar(projects, archiveProjectsResponse, archive);\n },\n error: () => {\n this.showErrorSnackBar(archive);\n }\n });\n }\n\n private makeArchiveProjectsRequest(projects: Project[]): Observable {\n const projectIds = projects.map((project) => project.id);\n return this.http.put(`/api/projects/archived`, projectIds);\n }\n\n private makeUnarchiveProjectsRequest(projects: Project[]): Observable {\n let params = new HttpParams();\n for (const project of projects) {\n params = params.append('projectIds', project.id);\n }\n return this.http.delete(`/api/projects/archived`, {\n params: params\n });\n }\n\n private updateProjectsArchivedStatus(\n projects: Project[],\n archiveProjectsResponse: ArchiveProjectResponse[]\n ): void {\n for (const archiveProjectResponse of archiveProjectsResponse) {\n const project = projects.find((project: Project) => project.id === archiveProjectResponse.id);\n project.updateArchivedStatus(archiveProjectResponse.archived, archiveProjectResponse.tag);\n }\n this.refreshProjects();\n }\n\n private openSuccessSnackBar(\n projects: Project[],\n archiveProjectsResponse: ArchiveProjectResponse[],\n archived: boolean\n ): void {\n const count = archiveProjectsResponse.filter(\n (response: ArchiveProjectResponse) => response.archived === archived\n ).length;\n this.snackBar\n .open(\n archived\n ? $localize`Successfully archived ${count} unit(s).`\n : $localize`Successfully restored ${count} unit(s).`,\n $localize`Undo`\n )\n .onAction()\n .subscribe(() => {\n this.undoArchiveAction(\n projects,\n archived ? 'makeUnarchiveProjectsRequest' : 'makeArchiveProjectsRequest'\n );\n });\n }\n\n private undoArchiveAction(projects: Project[], archiveFunctionName: string): void {\n this[archiveFunctionName](projects).subscribe({\n next: (archiveProjectsResponse: ArchiveProjectResponse[]) => {\n this.updateProjectsArchivedStatus(projects, archiveProjectsResponse);\n this.refreshProjects();\n this.snackBar.open($localize`Action undone.`);\n },\n error: () => {\n this.snackBar.open($localize`Error undoing action.`);\n }\n });\n }\n\n private showErrorSnackBar(archive: boolean): void {\n this.snackBar.open(\n archive ? $localize`Error archiving unit(s).` : $localize`Error restoring unit(s).`\n );\n }\n\n private refreshProjects(): void {\n this.refreshProjectsEventSource.next();\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "snackBar",
+ "type": "MatSnackBar",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 12,
+ "jsdoctags": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "snackBar",
+ "type": "MatSnackBar",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "AudioOscillatorService",
+ "id": "injectable-AudioOscillatorService-def8051b85840bd26a514ffecc841a9e26ebc7f6380ed0f6ffefad98805114553909de51c2aecb1df35beb48f17bd031ecb168340b1356c263d3a4d507c74131",
+ "file": "src/assets/wise5/components/audioOscillator/audioOscillatorService.ts",
+ "properties": [
+ {
+ "name": "defaultStartingAmplitude",
+ "defaultValue": "44",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "defaultStartingFrequency",
+ "defaultValue": "440",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "maxAmplitude",
+ "defaultValue": "50",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 43,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 10,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getOscilloscopeId",
+ "args": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 14,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 35,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { ComponentService } from '../componentService';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class AudioOscillatorService extends ComponentService {\n defaultStartingAmplitude: number = 44;\n defaultStartingFrequency: number = 440;\n maxAmplitude: number = 50;\n\n getComponentTypeLabel(): string {\n return $localize`Audio Oscillator`;\n }\n\n getOscilloscopeId(domIdEnding: string): string {\n return `oscilloscope-${domIdEnding}`;\n }\n\n createComponent() {\n const component: any = super.createComponent();\n component.type = 'AudioOscillator';\n component.oscillatorTypes = ['sine'];\n component.startingAmplitude = this.defaultStartingAmplitude;\n component.startingFrequency = this.defaultStartingFrequency;\n component.oscilloscopeWidth = 800;\n component.oscilloscopeHeight = 400;\n component.gridCellSize = 50;\n component.stopAfterGoodDraw = true;\n component.canStudentEditAmplitude = true;\n component.canStudentEditFrequency = true;\n component.canStudentViewAmplitudeInput = true;\n component.canStudentViewFrequencyInput = true;\n return component;\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any) {\n if (componentStates && componentStates.length) {\n const latestComponentState = componentStates[componentStates.length - 1];\n return this.componentStateHasStudentWork(latestComponentState, component);\n }\n return false;\n }\n\n componentStateHasStudentWork(componentState: any, componentContent: any) {\n if (componentState != null) {\n const studentData = componentState.studentData;\n if (studentData != null) {\n if (studentData.frequenciesPlayed != null && studentData.frequenciesPlayed.length > 0) {\n return true;\n }\n }\n }\n return false;\n }\n}\n",
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "AudioRecorderService",
+ "id": "injectable-AudioRecorderService-b5b92bec261c804ba25731c52af72be38f5e055a64e69670f2dff9ba575ca271068190445768b689ba3164518141ddc40071e661b7b5cee840a39c407395147c",
+ "file": "src/assets/wise5/services/audioRecorderService.ts",
+ "properties": [
+ {
+ "name": "audioRecorded$",
+ "defaultValue": "this.audioRecordedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "audioRecordedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "mediaRecorder",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "MediaRecorder",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "requester",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ }
+ ],
+ "methods": [
+ {
+ "name": "broadcastAudioRecorded",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 59,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAudioFile",
+ "args": [
+ {
+ "name": "blob",
+ "type": "Blob",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 37,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "blob",
+ "type": "Blob",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "init",
+ "args": [
+ {
+ "name": "constraints",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 13,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 134
+ ],
+ "jsdoctags": [
+ {
+ "name": "constraints",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "startRecording",
+ "args": [
+ {
+ "name": "requester",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 45,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "requester",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "stopRecording",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 55,
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\n@Injectable()\nexport class AudioRecorderService {\n mediaRecorder: MediaRecorder;\n requester: string;\n private audioRecordedSource: Subject = new Subject();\n public audioRecorded$: Observable = this.audioRecordedSource.asObservable();\n\n constructor() {}\n\n async init(constraints) {\n try {\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n const options = {\n mimeType: 'audio/webm'\n };\n try {\n this.mediaRecorder = new MediaRecorder(stream, options);\n this.mediaRecorder.ondataavailable = (event: any) => {\n this.broadcastAudioRecorded({\n requester: this.requester,\n audioFile: this.getAudioFile(event.data)\n });\n };\n this.mediaRecorder.start();\n } catch (e) {\n console.error('Exception while creating MediaRecorder:', e);\n return;\n }\n } catch (e) {\n console.error('navigator.getUserMedia error:', e);\n }\n }\n\n getAudioFile(blob: Blob) {\n const now = new Date().getTime();\n const filename = encodeURIComponent(`audio_${now}.webm`);\n return new File([blob], filename, {\n lastModified: now\n });\n }\n\n startRecording(requester: string) {\n this.requester = requester;\n const constraints = {\n audio: {\n echoCancellation: { exact: true }\n }\n };\n this.init(constraints);\n }\n\n stopRecording() {\n this.mediaRecorder.stop();\n }\n\n broadcastAudioRecorded(args: any) {\n this.audioRecordedSource.next(args);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [],
+ "line": 9
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "AuthGuard",
+ "id": "injectable-AuthGuard-ff14ca58e195ef5dfa81e963f6297a84151dfc124a7f21c8795f5de10fe2056a6d3d2680cbba7b18f2658cb1c2abb7aefa68ae04211db0486b63fc1a32404a33",
+ "file": "src/app/student/auth.guard.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "canAccess",
+ "args": [
+ {
+ "name": "url",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 29,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "url",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "canActivate",
+ "args": [
+ {
+ "name": "next",
+ "type": "ActivatedRouteSnapshot",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "state",
+ "type": "RouterStateSnapshot",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 12,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "next",
+ "type": "ActivatedRouteSnapshot",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "state",
+ "type": "RouterStateSnapshot",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "checkLogin",
+ "args": [
+ {
+ "name": "url",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 16,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "url",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';\nimport { Injectable } from '@angular/core';\nimport { UserService } from '../services/user.service';\n\n@Injectable()\nexport class AuthGuard {\n constructor(\n private userService: UserService,\n private router: Router\n ) {}\n\n canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n return this.checkLogin(state.url);\n }\n\n private checkLogin(url: string): boolean {\n let canAccessPage = false;\n if (this.canAccess(url)) {\n canAccessPage = true;\n } else if (this.userService.isAuthenticated) {\n this.router.navigate(['/']);\n } else {\n this.userService.redirectUrl = url;\n this.router.navigate(['/login']);\n }\n return canAccessPage;\n }\n\n private canAccess(url: string): boolean {\n return (\n (this.userService.isStudent() ||\n url.includes('/preview/unit') ||\n url.includes('/workgroupLimitReached')) &&\n !(this.userService.isSurveyStudent() && url.includes('/home'))\n );\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "userService",
+ "type": "UserService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "router",
+ "type": "Router",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 6,
+ "jsdoctags": [
+ {
+ "name": "userService",
+ "type": "UserService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "router",
+ "type": "Router",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "AuthGuard",
+ "id": "injectable-AuthGuard-63bb6cdfc83c49b7a1ca9cc79fe3392269be8aa5877073d6b287569b2bd1b4c43d7b82fed663a6df37d0dfc34115e57fde3ebab1e207841bc43f4b72568286d9-1",
+ "file": "src/app/teacher/auth.guard.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "canActivate",
+ "args": [
+ {
+ "name": "next",
+ "type": "ActivatedRouteSnapshot",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "state",
+ "type": "RouterStateSnapshot",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 9,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "next",
+ "type": "ActivatedRouteSnapshot",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "state",
+ "type": "RouterStateSnapshot",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "checkLogin",
+ "args": [
+ {
+ "name": "url",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 13,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "url",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';\nimport { UserService } from '../services/user.service';\n\n@Injectable()\nexport class AuthGuard {\n constructor(private userService: UserService, private router: Router) {}\n\n canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n return this.checkLogin(state.url);\n }\n\n checkLogin(url: string): boolean {\n if (this.userService.isTeacher()) {\n return true;\n } else if (this.userService.isAuthenticated) {\n this.router.navigate(['/']);\n return false;\n } else {\n this.userService.redirectUrl = url;\n this.router.navigate(['/login']);\n return false;\n }\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "userService",
+ "type": "UserService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "router",
+ "type": "Router",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 6,
+ "jsdoctags": [
+ {
+ "name": "userService",
+ "type": "UserService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "router",
+ "type": "Router",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable",
+ "isDuplicate": true,
+ "duplicateId": 1,
+ "duplicateName": "AuthGuard-1"
+ },
+ {
+ "name": "AuthorBranchService",
+ "id": "injectable-AuthorBranchService-c1c899fd24884e403c6e3c754599bbe5de59133eefc8d8b69d75133ca125a0d9f49044b044ed6051eec6cc5e92cc83421df8c0b8b717298fa11c8b6d42fa0150",
+ "file": "src/assets/wise5/services/authorBranchService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "addTransitionFromBranchNodeToPathNode",
+ "args": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "newNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 47,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "newNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createPathStep",
+ "args": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 17,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setBranchNodeTransitionLogic",
+ "args": [
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "criteria",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 40,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "criteria",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setPathStepTransitions",
+ "args": [
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "mergeStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "mergeStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { AuthorBranchParams } from '../common/AuthorBranchParams';\nimport { TeacherProjectService } from './teacherProjectService';\nimport {\n CHOICE_CHOSEN_VALUE,\n SCORE_VALUE,\n WORKGROUP_ID_VALUE\n} from '../../../app/domain/branchCriteria';\nimport { Transition } from '../common/Transition';\nimport { TransitionCriteria } from '../common/TransitionCriteria';\nimport { TransitionCriteriaParams } from '../common/TransitionCriteriaParams';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport abstract class AuthorBranchService {\n constructor(protected projectService: TeacherProjectService) {}\n\n protected createPathStep(\n params: AuthorBranchParams,\n branchNode: any,\n nodeId: string,\n pathIndex: number\n ): void {\n const newNode = this.projectService.createNode($localize`Path ${pathIndex + 1}`);\n newNode.id = nodeId;\n this.addTransitionFromBranchNodeToPathNode(params, branchNode, newNode, pathIndex);\n this.projectService.addNode(newNode);\n this.projectService.addApplicationNode(newNode);\n this.projectService.setIdToNode(newNode.id, newNode);\n this.projectService.addBranchPathTakenConstraints(newNode.id, branchNode.id, newNode.id);\n }\n\n protected setPathStepTransitions(newNodeIds: string[], mergeStepId: string): void {\n for (const newNodeId of newNodeIds) {\n this.projectService.getNode(newNodeId).getTransitionLogic().transitions = [\n new Transition(mergeStepId)\n ];\n }\n }\n\n protected setBranchNodeTransitionLogic(branchNode: any, criteria: string): void {\n branchNode.transitionLogic.maxPathsVisitable = 1;\n branchNode.transitionLogic.howToChooseAmongAvailablePaths =\n criteria === WORKGROUP_ID_VALUE ? WORKGROUP_ID_VALUE : 'random';\n branchNode.transitionLogic.canChangePath = false;\n }\n\n private addTransitionFromBranchNodeToPathNode(\n params: AuthorBranchParams,\n branchNode: any,\n newNode: any,\n pathIndex: number\n ): void {\n switch (params.criteria) {\n case SCORE_VALUE:\n branchNode.transitionLogic.transitions.push(\n new ScoreTransition(newNode.id, params, params.paths[pathIndex].split(','))\n );\n branchNode.transitionLogic.whenToChoosePath =\n params.branchStepId === params.nodeId ? 'studentDataChanged' : 'enterNode';\n break;\n case CHOICE_CHOSEN_VALUE:\n branchNode.transitionLogic.transitions.push(\n new ChoiceChosenTransition(newNode.id, params, [params.paths[pathIndex]])\n );\n branchNode.transitionLogic.whenToChoosePath =\n params.branchStepId === params.nodeId ? 'studentDataChanged' : 'enterNode';\n break;\n default:\n branchNode.transitionLogic.transitions.push(new Transition(newNode.id));\n branchNode.transitionLogic.whenToChoosePath = 'enterNode';\n }\n }\n}\n\nclass ScoreTransition extends Transition {\n constructor(toNodeId: string, params: AuthorBranchParams, scores: string[]) {\n super(toNodeId, [\n new TransitionCriteria(\n SCORE_VALUE,\n new TransitionCriteriaParams({\n nodeId: params.nodeId,\n componentId: params.componentId,\n scores: scores\n })\n )\n ]);\n }\n}\n\nclass ChoiceChosenTransition extends Transition {\n constructor(toNodeId: string, params: AuthorBranchParams, choiceIds: string[]) {\n super(toNodeId, [\n new TransitionCriteria(\n CHOICE_CHOSEN_VALUE,\n new TransitionCriteriaParams({\n nodeId: params.nodeId,\n componentId: params.componentId,\n choiceIds: choiceIds\n })\n )\n ]);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 14,
+ "jsdoctags": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "BranchService",
+ "id": "injectable-BranchService-a3bffe1779ead5375ca74518b72cf813d09caa44eeab5582475b98d0c87839605ae6008c0d2a3b85f89ec1a96c94aa7aec505b06b46dc8d44f0133cc7e13c970",
+ "file": "src/assets/wise5/services/branchService.ts",
+ "properties": [
+ {
+ "name": "branchesCache",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Branch[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ }
+ ],
+ "methods": [
+ {
+ "name": "allPathsContainNodeId",
+ "args": [
+ {
+ "name": "paths",
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 203,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if all the paths contain the node id\n",
+ "description": "Check if all the paths contain the node id
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 6093,
+ "end": 6098,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "paths"
+ },
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 6087,
+ "end": 6092,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an array of paths. each path contains an array of node ids
\n"
+ },
+ {
+ "name": {
+ "pos": 6170,
+ "end": 6176,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 6164,
+ "end": 6169,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id that we will check is in all the paths
\n"
+ },
+ {
+ "tagName": {
+ "pos": 6234,
+ "end": 6240,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the node id is in all the paths
\n"
+ }
+ ]
+ },
+ {
+ "name": "arrayEquals",
+ "args": [
+ {
+ "name": "a",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "b",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 141,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if two arrays are equal\n",
+ "description": "Check if two arrays are equal
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 4263,
+ "end": 4264,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "a"
+ },
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4257,
+ "end": 4262,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an array of strings
\n"
+ },
+ {
+ "name": {
+ "pos": 4297,
+ "end": 4298,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "b"
+ },
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4291,
+ "end": 4296,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an array of strings
\n"
+ },
+ {
+ "tagName": {
+ "pos": 4325,
+ "end": 4331,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the two arrays contain the strings in the same order
\n"
+ }
+ ]
+ },
+ {
+ "name": "clearBranchesCache",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 40,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "extractPathsUpToNodeId",
+ "args": [
+ {
+ "name": "paths",
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "[][]",
+ "typeParameters": [],
+ "line": 92,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nExtract the paths up to a given node id. This will be used to\nobtain branch paths.\n",
+ "description": "Extract the paths up to a given node id. This will be used to\nobtain branch paths.
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2871,
+ "end": 2876,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "paths"
+ },
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2865,
+ "end": 2870,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the paths to extract from
\n"
+ },
+ {
+ "name": {
+ "pos": 2915,
+ "end": 2921,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2909,
+ "end": 2914,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id to extract up to
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2957,
+ "end": 2963,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "paths that go up to but do not include the node id
\n"
+ }
+ ]
+ },
+ {
+ "name": "findBranches",
+ "args": [
+ {
+ "name": "paths",
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Branch[]",
+ "typeParameters": [],
+ "line": 51,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nFind the branches in the project\nthe branch start point, the branch paths, and the branch\nend point\n",
+ "description": "Find the branches in the project\nthe branch start point, the branch paths, and the branch\nend point
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 1267,
+ "end": 1272,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "paths"
+ },
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1261,
+ "end": 1266,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "all the possible paths through the project
\n"
+ },
+ {
+ "tagName": {
+ "pos": 1322,
+ "end": 1328,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "an array of branch objects. each branch object contains\nthe branch start point, the branch paths, and the branch\nend point
\n"
+ }
+ ]
+ },
+ {
+ "name": "findNextCommonNodeId",
+ "args": [
+ {
+ "name": "paths",
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 179,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nFind the next common node id in all the paths\nif there is no node id that is in all the paths\n",
+ "description": "Find the next common node id in all the paths\nif there is no node id that is in all the paths
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 5385,
+ "end": 5390,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "paths"
+ },
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5379,
+ "end": 5384,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the paths to find the common node id in
\n"
+ },
+ {
+ "tagName": {
+ "pos": 5437,
+ "end": 5443,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a node id that is in all the paths or null\nif there is no node id that is in all the paths
\n"
+ }
+ ]
+ },
+ {
+ "name": "getBranches",
+ "args": [
+ {
+ "name": "paths",
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Branch[]",
+ "typeParameters": [],
+ "line": 12,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "paths",
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getBranchesCache",
+ "args": [],
+ "optional": false,
+ "returnType": "Branch[]",
+ "typeParameters": [],
+ "line": 36,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "removeDuplicatePaths",
+ "args": [
+ {
+ "name": "paths",
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "[][]",
+ "typeParameters": [],
+ "line": 119,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nRemoves duplicate paths\n",
+ "description": "Removes duplicate paths
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3677,
+ "end": 3682,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "paths"
+ },
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3671,
+ "end": 3676,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an array of paths. each path contains an array of node ids
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3748,
+ "end": 3754,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "an array of unique paths
\n"
+ }
+ ]
+ },
+ {
+ "name": "setBranchesCache",
+ "args": [
+ {
+ "name": "branches",
+ "type": "Branch[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "branches",
+ "type": "Branch[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "trimPathsUpToNodeId",
+ "args": [
+ {
+ "name": "paths",
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 152,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nTrim the paths up to the given node id so that the paths will contain\nthe given node id and all the node ids after it. This function will\nmodify the paths.\n",
+ "description": "Trim the paths up to the given node id so that the paths will contain\nthe given node id and all the node ids after it. This function will\nmodify the paths.
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 4731,
+ "end": 4736,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "paths"
+ },
+ "type": "string[][]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4725,
+ "end": 4730,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the paths to trim
\n"
+ },
+ {
+ "name": {
+ "pos": 4767,
+ "end": 4773,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4761,
+ "end": 4766,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id to trim up to
\n"
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { Branch } from '../../../app/domain/branch';\nimport { ConfigService } from './configService';\nimport { PathService } from './pathService';\n\n@Injectable()\nexport class BranchService {\n branchesCache: Branch[];\n\n constructor(private configService: ConfigService, private pathService: PathService) {}\n\n getBranches(paths: string[][]): Branch[] {\n /*\n * Do not use the branches cache in the authoring tool because the branches\n * may change when the author changes the project. In all other modes the\n * branches can't change so we can use the cache.\n */\n if (this.configService.getMode() != 'author') {\n let branchesCache = this.getBranchesCache();\n if (branchesCache != null) {\n return branchesCache;\n }\n }\n\n const branches = this.findBranches(paths);\n if (this.configService.getMode() != 'author') {\n this.setBranchesCache(branches);\n }\n return branches;\n }\n\n private setBranchesCache(branches: Branch[]): void {\n this.branchesCache = branches;\n }\n\n private getBranchesCache(): Branch[] {\n return this.branchesCache;\n }\n\n clearBranchesCache() {\n this.branchesCache = null;\n }\n\n /**\n * Find the branches in the project\n * @param paths all the possible paths through the project\n * @return an array of branch objects. each branch object contains\n * the branch start point, the branch paths, and the branch\n * end point\n */\n private findBranches(paths: string[][]): Branch[] {\n const branches = [];\n let previousNodeId = null;\n\n /*\n * continue until all the paths are empty. we will remove\n * node ids from the paths as we traverse the paths to find\n * the branches\n */\n while (!this.pathService.arePathsEmpty(paths)) {\n const nodeId = this.pathService.getFirstNodeIdInPathAtIndex(paths, 0);\n\n if (this.pathService.areFirstNodeIdsInPathsTheSame(paths)) {\n // the first node ids in all the paths are the same\n\n this.pathService.removeNodeIdFromPaths(nodeId, paths);\n previousNodeId = nodeId;\n } else {\n // not all the top node ids are the same which means we have branched\n const nextCommonNodeId = this.findNextCommonNodeId(paths);\n let branchPaths = this.extractPathsUpToNodeId(paths, nextCommonNodeId);\n branchPaths = this.removeDuplicatePaths(branchPaths);\n branches.push(new Branch(previousNodeId, branchPaths, nextCommonNodeId));\n\n // trim the paths so that they start at the branch end point\n this.trimPathsUpToNodeId(paths, nextCommonNodeId);\n\n // remember this node id for the next iteration of the loop\n previousNodeId = nextCommonNodeId;\n }\n }\n return branches;\n }\n\n /**\n * Extract the paths up to a given node id. This will be used to\n * obtain branch paths.\n * @param paths the paths to extract from\n * @param nodeId the node id to extract up to\n * @return paths that go up to but do not include the node id\n */\n private extractPathsUpToNodeId(paths: string[][], nodeId: string): string[][] {\n const extractedPaths = [];\n for (let path of paths) {\n let index = path.indexOf(nodeId);\n if (index == -1) {\n /*\n * the node id is not in the path so we will\n * extract up to the end of the path\n */\n index = path.length;\n }\n\n /*\n * get the path up to the node id index. this does\n * not modify the path array.\n */\n const extractedPath = path.slice(0, index);\n extractedPaths.push(extractedPath);\n }\n return extractedPaths;\n }\n\n /**\n * Removes duplicate paths\n * @param paths an array of paths. each path contains an array of node ids\n * @return an array of unique paths\n */\n private removeDuplicatePaths(paths: string[][]): string[][] {\n const uniquePaths = [];\n for (const path of paths) {\n let isPathInUniquePaths = false;\n for (const uniquePath of uniquePaths) {\n if (this.arrayEquals(path, uniquePath)) {\n isPathInUniquePaths = true;\n }\n }\n if (!isPathInUniquePaths) {\n uniquePaths.push(path);\n }\n }\n return uniquePaths;\n }\n\n /**\n * Check if two arrays are equal\n * @param a an array of strings\n * @param b an array of strings\n * @return whether the two arrays contain the strings in the same order\n */\n private arrayEquals(a: string[], b: string[]): boolean {\n return a.length === b.length && a.every((val, index) => val === b[index]);\n }\n\n /**\n * Trim the paths up to the given node id so that the paths will contain\n * the given node id and all the node ids after it. This function will\n * modify the paths.\n * @param paths the paths to trim\n * @param nodeId the node id to trim up to\n */\n private trimPathsUpToNodeId(paths: string[][], nodeId: string): void {\n for (let path of paths) {\n let index = path.indexOf(nodeId);\n\n if (index == -1) {\n /*\n * the node id is not in the path so we will\n * trim the path to the end which will make\n * the path empty\n */\n index = path.length;\n }\n\n /*\n * trim the path up to the node id index. this will\n * modify the path array.\n */\n path.splice(0, index);\n }\n }\n\n /**\n * Find the next common node id in all the paths\n * @param paths the paths to find the common node id in\n * @return a node id that is in all the paths or null\n * if there is no node id that is in all the paths\n */\n private findNextCommonNodeId(paths: string[][]): string {\n let nextCommonNodeId = null;\n if (paths.length > 0) {\n const path = paths[0];\n for (const nodeId of path) {\n if (this.allPathsContainNodeId(paths, nodeId)) {\n /*\n * the node id is in all the paths so we have found\n * what we were looking for\n */\n nextCommonNodeId = nodeId;\n break;\n }\n }\n }\n return nextCommonNodeId;\n }\n\n /**\n * Check if all the paths contain the node id\n * @param paths an array of paths. each path contains an array of node ids\n * @param nodeId the node id that we will check is in all the paths\n * @return whether the node id is in all the paths\n */\n private allPathsContainNodeId(paths: string[][], nodeId: string): boolean {\n for (const path of paths) {\n if (!path.includes(nodeId)) {\n return false;\n }\n }\n return true;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "pathService",
+ "type": "PathService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 8,
+ "jsdoctags": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "pathService",
+ "type": "PathService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "ClassroomStatusService",
+ "id": "injectable-ClassroomStatusService-45ecfe53c60a90724003fe8e1122fe42e663c2c27c12825b39ff6d61dae27f2d762057227993be55263d022b944eafc468314e82c07dbd9bfd21d4527d7d403d",
+ "file": "src/assets/wise5/services/classroomStatusService.ts",
+ "properties": [
+ {
+ "name": "studentStatuses",
+ "defaultValue": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13
+ },
+ {
+ "name": "studentStatusReceived$",
+ "defaultValue": "this.studentStatusReceivedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "studentStatusReceivedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "addGroupNodeCompletion",
+ "args": [
+ {
+ "name": "nodeStatuses",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "onlyIncludeWorkNodes",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "numCompleted",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "numTotal",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "CompletionCounter",
+ "typeParameters": [],
+ "line": 168,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeStatuses",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "onlyIncludeWorkNodes",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "numCompleted",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "numTotal",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "addStepNodeCompletion",
+ "args": [
+ {
+ "name": "nodeStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "onlyIncludeWorkNodes",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "numCompleted",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "numTotal",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "CompletionCounter",
+ "typeParameters": [],
+ "line": 214,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "onlyIncludeWorkNodes",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "numCompleted",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "numTotal",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastStudentStatusReceived",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 358,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "calculateLegacyGroupCompletion",
+ "args": [
+ {
+ "name": "nodeStatuses",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "numCompleted",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "numTotal",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "CompletionCounter",
+ "typeParameters": [],
+ "line": 238,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeStatuses",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "numCompleted",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "numTotal",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCurrentNodeLocationForWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 54,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getDescendantStepIds",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string[]",
+ "typeParameters": [],
+ "line": 256,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getMaxScoreForWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 333,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the max score for the project for the given workgroup id\nto the given workgroupId or null if none of the visible components has max scores.\n",
+ "description": "Get the max score for the project for the given workgroup id\nto the given workgroupId or null if none of the visible components has max scores.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 10848,
+ "end": 10859,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 10842,
+ "end": 10847,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": ""
+ },
+ {
+ "tagName": {
+ "pos": 10866,
+ "end": 10873,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the sum of the max scores for all the nodes in the project visible\nto the given workgroupId or null if none of the visible components has max scores.
\n"
+ }
+ ]
+ },
+ {
+ "name": "getNodeAverageScore",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 292,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the average score for a node for a period\n",
+ "description": "Get the average score for a node for a period
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 9468,
+ "end": 9474,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9462,
+ "end": 9467,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": {
+ "pos": 9499,
+ "end": 9507,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "periodId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9493,
+ "end": 9498,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the period id. pass in -1 to select all periods.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 9563,
+ "end": 9570,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the average score for the node for the period
\n"
+ }
+ ]
+ },
+ {
+ "name": "getNodeCompletion",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "onlyIncludeWorkNodes",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 121,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet node completion data\n",
+ "description": "Get node completion data
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 4127,
+ "end": 4133,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4121,
+ "end": 4126,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": {
+ "pos": 4158,
+ "end": 4166,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "periodId"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4152,
+ "end": 4157,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the period id (pass in -1 to select all periods)
\n"
+ },
+ {
+ "name": {
+ "pos": 4228,
+ "end": 4239,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "pos": 4222,
+ "end": 4227,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the workgroup id to limit results to
\n"
+ },
+ {
+ "name": {
+ "pos": 4300,
+ "end": 4320,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "onlyIncludeWorkNodes"
+ },
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "pos": 4294,
+ "end": 4299,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) boolean whether to only include work nodes
\n"
+ },
+ {
+ "tagName": {
+ "pos": 4381,
+ "end": 4388,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "object with completed, total, and percent completed (integer between 0 and 100)
\n"
+ }
+ ]
+ },
+ {
+ "name": "getNodeCompletionResult",
+ "args": [
+ {
+ "name": "numCompleted",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "numTotal",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 277,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "numCompleted",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "numTotal",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getStudentProjectCompletion",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "ProjectCompletion",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getStudentStatuses",
+ "args": [],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 50,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getStudentStatusesForPeriodAndWorkgroup",
+ "args": [
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "StudentStatus[]",
+ "typeParameters": [],
+ "line": 157,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getStudentStatusForWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 66,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getWorkNodeCompletion",
+ "args": [
+ {
+ "name": "progress",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeStatuses",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "numCompleted",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "numTotal",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "CompletionCounter",
+ "typeParameters": [],
+ "line": 191,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "progress",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeStatuses",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "numCompleted",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "numTotal",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasStudentStatus",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 74,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isIncludeStepStatusInCount",
+ "args": [
+ {
+ "name": "nodeStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "onlyIncludeWorkNodes",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 267,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "onlyIncludeWorkNodes",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isVisibleAndHasWork",
+ "args": [
+ {
+ "name": "nodeStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 263,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "parseStudentStatuses",
+ "args": [
+ {
+ "name": "studentStatuses",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 33,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "studentStatuses",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "periodMatches",
+ "args": [
+ {
+ "name": "studentStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 230,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "studentStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "retrieveStudentStatuses",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 24,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "setStudentStatus",
+ "args": [
+ {
+ "name": "studentStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 78,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "studentStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "workgroupMatches",
+ "args": [
+ {
+ "name": "studentStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 234,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "studentStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { AnnotationService } from './annotationService';\nimport { ConfigService } from './configService';\nimport { ProjectService } from './projectService';\nimport { Observable, Subject, tap } from 'rxjs';\nimport { ProjectCompletion } from '../common/ProjectCompletion';\nimport { StudentStatus } from '../common/StudentStatus';\nimport { CompletionCounter } from '../common/CompletionCounter';\n\n@Injectable()\nexport class ClassroomStatusService {\n studentStatuses = [];\n private studentStatusReceivedSource: Subject = new Subject();\n public studentStatusReceived$: Observable = this.studentStatusReceivedSource.asObservable();\n\n constructor(\n private http: HttpClient,\n private annotationService: AnnotationService,\n private configService: ConfigService,\n private projectService: ProjectService\n ) {}\n\n retrieveStudentStatuses(): any {\n return this.http.get(`/api/teacher/run/${this.configService.getRunId()}/student-status`).pipe(\n tap((studentStatuses: any[]) => {\n this.studentStatuses = this.parseStudentStatuses(studentStatuses);\n return this.studentStatuses;\n })\n );\n }\n\n private parseStudentStatuses(studentStatuses: any[]): any[] {\n const parsedStatuses = [];\n const workgroups = this.configService.getClassmateUserInfos();\n for (const studentStatus of studentStatuses) {\n if (\n workgroups.find((workgroup) => {\n return workgroup.workgroupId === studentStatus.workgroupId;\n })\n ) {\n const parsedStatus = JSON.parse(studentStatus.status);\n parsedStatus.postTimestamp = studentStatus.timestamp;\n parsedStatuses.push(parsedStatus);\n }\n }\n return parsedStatuses;\n }\n\n getStudentStatuses() {\n return this.studentStatuses;\n }\n\n getCurrentNodeLocationForWorkgroupId(workgroupId: number): any {\n const studentStatus = this.getStudentStatusForWorkgroupId(workgroupId);\n if (studentStatus != null) {\n const currentNodeId = studentStatus.currentNodeId;\n return {\n position: this.projectService.getNodePositionAndTitle(currentNodeId),\n order: this.projectService.getNodeOrderById(currentNodeId)\n };\n }\n return null;\n }\n\n getStudentStatusForWorkgroupId(workgroupId: number): any {\n return (\n this.getStudentStatuses().find(\n (studentStatus) => studentStatus.workgroupId === workgroupId\n ) || null\n );\n }\n\n hasStudentStatus(workgroupId: number): boolean {\n return this.getStudentStatusForWorkgroupId(workgroupId) != null;\n }\n\n setStudentStatus(studentStatus: any): void {\n let isStudentStatusFound = false;\n const studentStatuses = this.getStudentStatuses();\n for (let x = 0; x < studentStatuses.length; x++) {\n const aStudentStatus = studentStatuses[x];\n if (aStudentStatus.workgroupId === studentStatus.workgroupId) {\n studentStatuses.splice(x, 1, studentStatus);\n isStudentStatusFound = true;\n break;\n }\n }\n if (!isStudentStatusFound) {\n studentStatuses.push(studentStatus);\n }\n }\n\n getStudentProjectCompletion(workgroupId: number): ProjectCompletion {\n let completion: ProjectCompletion = new ProjectCompletion();\n const studentStatus = this.getStudentStatusForWorkgroupId(workgroupId);\n if (studentStatus) {\n const projectCompletion = studentStatus.projectCompletion;\n const completionPctWithWork = projectCompletion.completionPctWithWork;\n if (completionPctWithWork) {\n completion.totalItems = projectCompletion.totalItemsWithWork;\n completion.completedItems = projectCompletion.completedItemsWithWork;\n completion.completionPct = projectCompletion.completionPctWithWork;\n } else {\n // we have a legacy projectCompletion object that only includes information for all nodes so\n // we need to calculate completion manually\n completion = this.getNodeCompletion('group0', -1, workgroupId, true);\n }\n }\n return completion;\n }\n\n /**\n * Get node completion data\n * @param nodeId the node id\n * @param periodId the period id (pass in -1 to select all periods)\n * @param workgroupId (optional) the workgroup id to limit results to\n * @param onlyIncludeWorkNodes (optional) boolean whether to only include work nodes\n * @returns object with completed, total, and percent completed (integer between 0 and 100)\n */\n getNodeCompletion(\n nodeId: string,\n periodId: number,\n workgroupId: number = null,\n onlyIncludeWorkNodes: boolean = false\n ): any {\n let numCompleted = 0;\n let numTotal = 0;\n const isGroupNode = this.projectService.isGroupNode(nodeId);\n const studentStatuses = this.getStudentStatusesForPeriodAndWorkgroup(periodId, workgroupId);\n for (const studentStatus of studentStatuses) {\n const nodeStatuses = studentStatus.nodeStatuses;\n const nodeStatus = nodeStatuses[nodeId];\n if (nodeStatus != null) {\n if (isGroupNode) {\n ({ numCompleted, numTotal } = this.addGroupNodeCompletion(\n nodeStatuses,\n nodeId,\n onlyIncludeWorkNodes,\n numCompleted,\n numTotal\n ));\n } else {\n ({ numCompleted, numTotal } = this.addStepNodeCompletion(\n nodeStatus,\n nodeId,\n onlyIncludeWorkNodes,\n numCompleted,\n numTotal\n ));\n }\n }\n }\n return this.getNodeCompletionResult(numCompleted, numTotal);\n }\n\n private getStudentStatusesForPeriodAndWorkgroup(\n periodId: number,\n workgroupId: number\n ): StudentStatus[] {\n return this.studentStatuses.filter(\n (studentStatus) =>\n this.periodMatches(studentStatus, periodId) &&\n this.workgroupMatches(studentStatus, workgroupId)\n );\n }\n\n private addGroupNodeCompletion(\n nodeStatuses: any,\n nodeId: string,\n onlyIncludeWorkNodes: boolean,\n numCompleted: number,\n numTotal: number\n ): CompletionCounter {\n const progress = nodeStatuses[nodeId].progress;\n if (onlyIncludeWorkNodes) {\n ({ numTotal, numCompleted } = this.getWorkNodeCompletion(\n progress,\n nodeStatuses,\n nodeId,\n numCompleted,\n numTotal\n ));\n } else if (progress) {\n numTotal += progress.totalItems;\n numCompleted += progress.completedItems;\n }\n return { numCompleted, numTotal };\n }\n\n private getWorkNodeCompletion(\n progress: any,\n nodeStatuses: any,\n nodeId: string,\n numCompleted: number,\n numTotal: number\n ): CompletionCounter {\n if (progress && progress.totalItemsWithWork) {\n numCompleted += progress.completedItemsWithWork;\n numTotal += progress.totalItemsWithWork;\n } else {\n // we have a legacy nodeStatus.progress that only includes completion information for all\n // nodes so we need to calculate the completion manually\n ({ numCompleted, numTotal } = this.calculateLegacyGroupCompletion(\n nodeStatuses,\n nodeId,\n numCompleted,\n numTotal\n ));\n }\n return { numCompleted, numTotal };\n }\n\n private addStepNodeCompletion(\n nodeStatus: any,\n nodeId: string,\n onlyIncludeWorkNodes: boolean,\n numCompleted: number,\n numTotal: number\n ): CompletionCounter {\n if (this.isIncludeStepStatusInCount(nodeStatus, nodeId, onlyIncludeWorkNodes)) {\n numTotal++;\n if (nodeStatus.isCompleted) {\n numCompleted++;\n }\n }\n return { numCompleted, numTotal };\n }\n\n private periodMatches(studentStatus: any, periodId: number): boolean {\n return periodId === -1 || periodId === studentStatus.periodId;\n }\n\n private workgroupMatches(studentStatus: any, workgroupId: number): boolean {\n return !workgroupId || workgroupId === studentStatus.workgroupId;\n }\n\n private calculateLegacyGroupCompletion(\n nodeStatuses: any,\n nodeId: string,\n numCompleted: number,\n numTotal: number\n ): CompletionCounter {\n for (const descendantId of this.getDescendantStepIds(nodeId)) {\n const descendantStatus = nodeStatuses[descendantId];\n if (this.isVisibleAndHasWork(descendantStatus, descendantId)) {\n if (descendantStatus.isCompleted) {\n numCompleted++;\n }\n numTotal++;\n }\n }\n return { numCompleted, numTotal };\n }\n\n private getDescendantStepIds(nodeId: string): string[] {\n const group = this.projectService.getNodeById(nodeId);\n return this.projectService\n .getDescendentIdsOfGroup(group)\n .filter((descendantId) => !this.projectService.isGroupNode(descendantId));\n }\n\n private isVisibleAndHasWork(nodeStatus: any, nodeId: string): boolean {\n return nodeStatus && nodeStatus.isVisible && this.projectService.nodeHasWork(nodeId);\n }\n\n private isIncludeStepStatusInCount(\n nodeStatus: any,\n nodeId: string,\n onlyIncludeWorkNodes: boolean\n ): boolean {\n return (\n nodeStatus.isVisible && (!onlyIncludeWorkNodes || this.projectService.nodeHasWork(nodeId))\n );\n }\n\n private getNodeCompletionResult(numCompleted: number, numTotal: number): any {\n const completionPercentage = numTotal > 0 ? Math.round((100 * numCompleted) / numTotal) : 0;\n return {\n completedItems: numCompleted,\n totalItems: numTotal,\n completionPct: completionPercentage\n };\n }\n\n /**\n * Get the average score for a node for a period\n * @param nodeId the node id\n * @param periodId the period id. pass in -1 to select all periods.\n * @returns the average score for the node for the period\n */\n getNodeAverageScore(nodeId, periodId) {\n let studentScoreSum = 0;\n let numStudentsWithScore = 0;\n const studentStatuses = this.studentStatuses;\n\n for (const studentStatus of studentStatuses) {\n if (studentStatus != null) {\n if (periodId === -1 || periodId === studentStatus.periodId) {\n // the period matches the one we are looking for\n const workgroupId = studentStatus.workgroupId;\n\n // get the workgroups score on the node\n const score = this.annotationService.getTotalNodeScoreForWorkgroup(workgroupId, nodeId);\n\n if (score != null) {\n // increment the counter of students with a score for this node\n numStudentsWithScore++;\n\n // accumulate the sum of the scores for this node\n studentScoreSum += score;\n }\n }\n }\n }\n\n let averageScore = null;\n\n if (numStudentsWithScore !== 0) {\n // calculate the average score for this node rounded down to the nearest hundredth\n averageScore = Math.floor((100 * studentScoreSum) / numStudentsWithScore) / 100;\n }\n\n return averageScore;\n }\n\n /**\n * Get the max score for the project for the given workgroup id\n * @param workgroupId\n * @returns the sum of the max scores for all the nodes in the project visible\n * to the given workgroupId or null if none of the visible components has max scores.\n */\n getMaxScoreForWorkgroupId(workgroupId) {\n let maxScore = null;\n let studentStatus = this.getStudentStatusForWorkgroupId(workgroupId);\n if (studentStatus) {\n let nodeStatuses = studentStatus.nodeStatuses;\n if (nodeStatuses) {\n for (let p in nodeStatuses) {\n if (nodeStatuses.hasOwnProperty(p)) {\n let nodeStatus = nodeStatuses[p];\n let nodeId = nodeStatus.nodeId;\n if (nodeStatus.isVisible && this.projectService.isApplicationNode(nodeId)) {\n let nodeMaxScore = this.projectService.getMaxScoreForNode(nodeId);\n if (nodeMaxScore) {\n // there is a max score for the node, so add to total\n // TODO geoffreykwan: trying to add to null?\n maxScore += nodeMaxScore;\n }\n }\n }\n }\n }\n }\n return maxScore;\n }\n\n broadcastStudentStatusReceived(args: any) {\n this.studentStatusReceivedSource.next(args);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotationService",
+ "type": "AnnotationService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 15,
+ "jsdoctags": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "annotationService",
+ "type": "AnnotationService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "ClickToSnipImageService",
+ "id": "injectable-ClickToSnipImageService-8abb78247f401206edcf8784f9b8de2ecbdbcfe5800110bd0835f0623f418728710f3209d913b8221e0205fa30cd9422e975f873f6c55fdc21f5e0c75ed572c6",
+ "file": "src/assets/wise5/services/clickToSnipImageService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "injectClickToSnipImageListener",
+ "args": [
+ {
+ "name": "content",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 10,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nInject the ng-click attribute that will call the snipImage function\n",
+ "description": "Inject the ng-click attribute that will call the snipImage function
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 189,
+ "end": 196,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "content"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 183,
+ "end": 188,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the content
\n"
+ },
+ {
+ "tagName": {
+ "pos": 215,
+ "end": 222,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the modified content
\n"
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class ClickToSnipImageService {\n /**\n * Inject the ng-click attribute that will call the snipImage function\n * @param content the content\n * @returns the modified content\n */\n injectClickToSnipImageListener(content: any): any {\n let contentString = JSON.stringify(content);\n const imgMatcher = new RegExp('', 'gi');\n contentString = contentString.replace(imgMatcher, (matchedString: string) => {\n return matchedString.replace(\n ' Check if the given node or component is completed
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 541,
+ "end": 547,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 535,
+ "end": 540,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": {
+ "pos": 572,
+ "end": 583,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "pos": 566,
+ "end": 571,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 618,
+ "end": 625,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether the node or component is completed
\n"
+ }
+ ]
+ },
+ {
+ "name": "isComponentCompleted",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isGroupNodeCompleted",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 52,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { ComponentServiceLookupService } from './componentServiceLookupService';\nimport { ProjectService } from './projectService';\nimport { StudentDataService } from './studentDataService';\n\n@Injectable()\nexport class CompletionService {\n constructor(\n private componentServiceLookupService: ComponentServiceLookupService,\n private dataService: StudentDataService,\n private projectService: ProjectService\n ) {}\n\n /**\n * Check if the given node or component is completed\n * @param nodeId the node id\n * @param componentId (optional) the component id\n * @returns whether the node or component is completed\n */\n isCompleted(nodeId: string, componentId: string = null): boolean {\n let result = false;\n if (nodeId && componentId) {\n result = this.isComponentCompleted(nodeId, componentId);\n } else if (this.projectService.isGroupNode(nodeId)) {\n result = this.isGroupNodeCompleted(nodeId);\n } else if (this.projectService.isApplicationNode(nodeId)) {\n result = this.dataService.nodeStatuses[nodeId]?.isCompleted;\n }\n return result;\n }\n\n private isComponentCompleted(nodeId: string, componentId: string): boolean {\n const component = this.projectService.getComponent(nodeId, componentId);\n if (component != null) {\n const node = this.projectService.getNodeById(nodeId);\n const componentType = component.type;\n const service = this.componentServiceLookupService.getService(componentType);\n if (['OpenResponse', 'Discussion'].includes(componentType)) {\n return service.isCompletedV2(node, component, this.dataService.studentData);\n } else {\n const componentStates = this.dataService.getComponentStatesByNodeIdAndComponentId(\n nodeId,\n componentId\n );\n const nodeEvents = this.dataService.getEventsByNodeId(nodeId);\n return service.isCompleted(component, componentStates, nodeEvents, node);\n }\n }\n return false;\n }\n\n private isGroupNodeCompleted(nodeId: string): boolean {\n return this.projectService\n .getChildNodeIdsById(nodeId)\n .every(\n (id) =>\n this.dataService.nodeStatuses[id] != null &&\n this.dataService.nodeStatuses[id].isVisible &&\n this.dataService.nodeStatuses[id].isCompleted\n );\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "componentServiceLookupService",
+ "type": "ComponentServiceLookupService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "dataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 7,
+ "jsdoctags": [
+ {
+ "name": "componentServiceLookupService",
+ "type": "ComponentServiceLookupService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "dataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "ComponentInfoService",
+ "id": "injectable-ComponentInfoService-6cbb96a0d05afcb9890eeb9366bd4663bcba4e82b8bed02c63bf391d75613a99c8731f3286e04f77bb5f534fc50d559534bd48f2cf2eacf8c4b707f437403e7b",
+ "file": "src/assets/wise5/services/componentInfoService.ts",
+ "properties": [
+ {
+ "name": "componentInfo",
+ "defaultValue": "{\n AiChat: new AiChatInfo(),\n Animation: new AnimationInfo(),\n AudioOscillator: new AudioOscillatorInfo(),\n ConceptMap: new ConceptMapInfo(),\n DialogGuidance: new DialogGuidanceInfo(),\n Discussion: new DiscussionInfo(),\n Draw: new DrawInfo(),\n Embedded: new EmbeddedInfo(),\n Graph: new GraphInfo(),\n HTML: new HtmlInfo(),\n Label: new LabelInfo(),\n Match: new MatchInfo(),\n MultipleChoice: new MultipleChoiceInfo(),\n OpenResponse: new OpenResponseInfo(),\n OutsideURL: new OutsideUrlInfo(),\n PeerChat: new PeerChatInfo(),\n ShowGroupWork: new ShowGroupWorkInfo(),\n ShowMyWork: new ShowMyWorkInfo(),\n Summary: new SummaryInfo(),\n Table: new TableInfo()\n }",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "object",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 26,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "getInfo",
+ "args": [
+ {
+ "name": "componentType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "ComponentInfo",
+ "typeParameters": [],
+ "line": 49,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { MultipleChoiceInfo } from '../components/multipleChoice/MultipleChoiceInfo';\nimport { OpenResponseInfo } from '../components/openResponse/OpenResponseInfo';\nimport { AnimationInfo } from '../components/animation/AnimationInfo';\nimport { AudioOscillatorInfo } from '../components/audioOscillator/AudioOscillatorInfo';\nimport { ConceptMapInfo } from '../components/conceptMap/ConceptMapInfo';\nimport { DialogGuidanceInfo } from '../components/dialogGuidance/DialogGuidanceInfo';\nimport { DiscussionInfo } from '../components/discussion/DiscussionInfo';\nimport { DrawInfo } from '../components/draw/DrawInfo';\nimport { EmbeddedInfo } from '../components/embedded/EmbeddedInfo';\nimport { GraphInfo } from '../components/graph/GraphInfo';\nimport { HtmlInfo } from '../components/html/HtmlInfo';\nimport { LabelInfo } from '../components/label/LabelInfo';\nimport { MatchInfo } from '../components/match/MatchInfo';\nimport { OutsideUrlInfo } from '../components/outsideURL/OutsideUrlInfo';\nimport { PeerChatInfo } from '../components/peerChat/PeerChatInfo';\nimport { ShowGroupWorkInfo } from '../components/showGroupWork/ShowGroupWorkInfo';\nimport { ShowMyWorkInfo } from '../components/showMyWork/ShowMyWorkInfo';\nimport { SummaryInfo } from '../components/summary/SummaryInfo';\nimport { TableInfo } from '../components/table/TableInfo';\nimport { ComponentInfo } from '../components/ComponentInfo';\nimport { AiChatInfo } from '../components/aiChat/AiChatInfo';\n\n@Injectable()\nexport class ComponentInfoService {\n private componentInfo = {\n AiChat: new AiChatInfo(),\n Animation: new AnimationInfo(),\n AudioOscillator: new AudioOscillatorInfo(),\n ConceptMap: new ConceptMapInfo(),\n DialogGuidance: new DialogGuidanceInfo(),\n Discussion: new DiscussionInfo(),\n Draw: new DrawInfo(),\n Embedded: new EmbeddedInfo(),\n Graph: new GraphInfo(),\n HTML: new HtmlInfo(),\n Label: new LabelInfo(),\n Match: new MatchInfo(),\n MultipleChoice: new MultipleChoiceInfo(),\n OpenResponse: new OpenResponseInfo(),\n OutsideURL: new OutsideUrlInfo(),\n PeerChat: new PeerChatInfo(),\n ShowGroupWork: new ShowGroupWorkInfo(),\n ShowMyWork: new ShowMyWorkInfo(),\n Summary: new SummaryInfo(),\n Table: new TableInfo()\n };\n\n getInfo(componentType: string): ComponentInfo {\n return this.componentInfo[componentType];\n }\n}\n",
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "ComponentService",
+ "id": "injectable-ComponentService-0cba2e21ccd2a776200572577f230db34622b7233146abd0f5863902986631efc6d062d9b0ce6cb4cb87a8734ae4e9f28e66d7bda52013f96277e90ff8c4ca7d",
+ "file": "src/assets/wise5/components/componentService.ts",
+ "properties": [
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 118,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the component state has student work. Sometimes a component\nstate may be created if the student visits a component but doesn't\nactually perform any work. This is where we will check if the student\nactually performed any work.\n",
+ "description": "Check if the component state has student work. Sometimes a component\nstate may be created if the student visits a component but doesn't\nactually perform any work. This is where we will check if the student\nactually performed any work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3634,
+ "end": 3648,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3628,
+ "end": 3633,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state object
\n"
+ },
+ {
+ "name": {
+ "pos": 3688,
+ "end": 3704,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3682,
+ "end": 3687,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3733,
+ "end": 3739,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the component state has any work
\n",
+ "returnType": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "{ id: any; type: string; prompt: string; showSaveButton: boolean; showSubmitButton: boolean; }",
+ "typeParameters": [],
+ "line": 66,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate a component object\n",
+ "description": "Create a component object
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 2025,
+ "end": 2032,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "a component object
\n",
+ "returnType": "object"
+ }
+ ]
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 58,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the component type label. For example \"Open Response\".\n",
+ "description": "Get the component type label. For example "Open Response".
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 1903,
+ "end": 1910,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "",
+ "returnType": "string"
+ }
+ ]
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ]
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 84,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the component was completed\n",
+ "description": "Check if the component was completed
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2298,
+ "end": 2307,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2292,
+ "end": 2297,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component object
\n"
+ },
+ {
+ "name": {
+ "pos": 2341,
+ "end": 2356,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentStates"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2335,
+ "end": 2340,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component states for the specific component
\n"
+ },
+ {
+ "name": {
+ "pos": 2417,
+ "end": 2427,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeEvents"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2411,
+ "end": 2416,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the events for the parent node of the component
\n"
+ },
+ {
+ "name": {
+ "pos": 2488,
+ "end": 2492,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "node"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2482,
+ "end": 2487,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "parent node of the component
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2528,
+ "end": 2535,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether the component was completed
\n",
+ "returnType": "boolean"
+ }
+ ]
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "'use strict';\n\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { generateRandomKey } from '../common/string/string';\nimport { ComponentStateRequest } from './ComponentStateRequest';\nimport { ComponentStateWrapper } from './ComponentStateWrapper';\n\n@Injectable()\nexport class ComponentService {\n private requestComponentStateSource = new Subject();\n public requestComponentStateSource$ = this.requestComponentStateSource.asObservable();\n private sendComponentStateSource = new Subject();\n public sendComponentStateSource$ = this.sendComponentStateSource.asObservable();\n private notifyConnectedComponentSource = new Subject();\n public notifyConnectedComponentSource$ = this.notifyConnectedComponentSource.asObservable();\n\n getDomIdEnding(nodeId: string, componentId: string, componentState: any): string {\n if (componentState == null) {\n return `${nodeId}-${componentId}`;\n } else {\n return `${nodeId}-${componentId}-${componentState.id}`;\n }\n }\n\n getElementId(domIdBeginning: string, domIdEnding: string): string {\n return `${domIdBeginning}-${domIdEnding}`;\n }\n\n requestComponentState(nodeId: string, componentId: string, isSubmit: boolean = false): void {\n this.requestComponentStateSource.next({\n nodeId: nodeId,\n componentId: componentId,\n isSubmit: isSubmit\n });\n }\n\n sendComponentState(componentStateWrapper: ComponentStateWrapper): void {\n this.sendComponentStateSource.next(componentStateWrapper);\n }\n\n notifyConnectedComponentSubscribers(\n nodeId: string,\n componentId: string,\n componentState: any\n ): void {\n this.notifyConnectedComponentSource.next({\n nodeId: nodeId,\n componentId: componentId,\n componentState: componentState\n });\n }\n\n /**\n * Get the component type label. For example \"Open Response\".\n * @returns {string}\n */\n getComponentTypeLabel(): string {\n return '';\n }\n\n /**\n * Create a component object\n * @returns {object} a component object\n */\n createComponent() {\n return {\n id: generateRandomKey(),\n type: '',\n prompt: '',\n showSaveButton: false,\n showSubmitButton: false\n };\n }\n\n /**\n * Check if the component was completed\n * @param component the component object\n * @param componentStates the component states for the specific component\n * @param nodeEvents the events for the parent node of the component\n * @param node parent node of the component\n * @returns {boolean} whether the component was completed\n */\n isCompleted(component, componentStates, nodeEvents, node) {\n return true;\n }\n\n /**\n * Check if we need to display the annotation to the student\n * @param componentContent the component content\n * @param annotation the annotation\n * @returns {boolean} whether we need to display the annotation to the student\n */\n displayAnnotation(componentContent, annotation) {\n return true;\n }\n\n /**\n * Whether this component generates student work\n * @param component (optional) the component object. if the component object\n * is not provided, we will use the default value of whether the\n * component type usually has work.\n * @return {boolean} whether this component generates student work\n */\n componentHasWork(component) {\n return true;\n }\n\n /**\n * Check if the component state has student work. Sometimes a component\n * state may be created if the student visits a component but doesn't\n * actually perform any work. This is where we will check if the student\n * actually performed any work.\n * @param componentState the component state object\n * @param componentContent the component content\n * @return {boolean} whether the component state has any work\n */\n componentStateHasStudentWork(componentState, componentContent) {\n return false;\n }\n\n /**\n * Get the human readable student data string\n * @param componentState the component state\n * @return {string} a human readable student data string\n */\n getStudentDataString(componentState) {\n return '';\n }\n\n /**\n * Whether this component uses a save button\n * @return {boolean} whether this component uses a save button\n */\n componentUsesSaveButton() {\n return true;\n }\n\n /**\n * Whether this component uses a submit button\n * @return {boolean} whether this component uses a submit button\n */\n componentUsesSubmitButton() {\n return true;\n }\n\n componentHasCorrectAnswer(component) {\n return false;\n }\n\n isSubmitRequired(node: any, component: any) {\n return node.showSubmitButton || (component.showSubmitButton && !node.showSaveButton);\n }\n\n hasNodeEnteredEvent(nodeEvents: any[]): boolean {\n return nodeEvents.some((nodeEvent: any) => {\n return nodeEvent.event === 'nodeEntered';\n });\n }\n}\n",
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "ComponentServiceLookupService",
+ "id": "injectable-ComponentServiceLookupService-c3cdb6353d580df7c4eea7b032f3862bf7c856300f3248621f16637d05a894649ee899b65753d4f2cfaa9e3f7d8e328e5808a11789c8f9c78fc8234fc0d84775",
+ "file": "src/assets/wise5/services/componentServiceLookupService.ts",
+ "properties": [
+ {
+ "name": "services",
+ "defaultValue": "new Map()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 25
+ }
+ ],
+ "methods": [
+ {
+ "name": "getService",
+ "args": [
+ {
+ "name": "componentType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 71,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { AnimationService } from '../components/animation/animationService';\nimport { AudioOscillatorService } from '../components/audioOscillator/audioOscillatorService';\nimport { ConceptMapService } from '../components/conceptMap/conceptMapService';\nimport { DialogGuidanceService } from '../components/dialogGuidance/dialogGuidanceService';\nimport { DiscussionService } from '../components/discussion/discussionService';\nimport { DrawService } from '../components/draw/drawService';\nimport { EmbeddedService } from '../components/embedded/embeddedService';\nimport { GraphService } from '../components/graph/graphService';\nimport { HTMLService } from '../components/html/htmlService';\nimport { LabelService } from '../components/label/labelService';\nimport { MatchService } from '../components/match/matchService';\nimport { MultipleChoiceService } from '../components/multipleChoice/multipleChoiceService';\nimport { OpenResponseService } from '../components/openResponse/openResponseService';\nimport { OutsideURLService } from '../components/outsideURL/outsideURLService';\nimport { PeerChatService } from '../components/peerChat/peerChatService';\nimport { ShowGroupWorkService } from '../components/showGroupWork/showGroupWorkService';\nimport { ShowMyWorkService } from '../components/showMyWork/showMyWorkService';\nimport { SummaryService } from '../components/summary/summaryService';\nimport { TableService } from '../components/table/tableService';\nimport { AiChatService } from '../components/aiChat/aiChatService';\n\n@Injectable()\nexport class ComponentServiceLookupService {\n services = new Map();\n\n constructor(\n private aiChatService: AiChatService,\n private animationService: AnimationService,\n private audioOscillatorService: AudioOscillatorService,\n private conceptMapService: ConceptMapService,\n private dialogGuidanceService: DialogGuidanceService,\n private discussionService: DiscussionService,\n private drawService: DrawService,\n private embeddedService: EmbeddedService,\n private graphService: GraphService,\n private labelService: LabelService,\n private matchService: MatchService,\n private multipleChoiceService: MultipleChoiceService,\n private openResponseService: OpenResponseService,\n private outsideURLService: OutsideURLService,\n private peerChatService: PeerChatService,\n private htmlService: HTMLService,\n private showGroupWorkService: ShowGroupWorkService,\n private showMyWorkService: ShowMyWorkService,\n private summaryService: SummaryService,\n private tableService: TableService\n ) {\n this.services.set('AiChat', this.aiChatService);\n this.services.set('Animation', this.animationService);\n this.services.set('AudioOscillator', this.audioOscillatorService);\n this.services.set('ConceptMap', this.conceptMapService);\n this.services.set('DialogGuidance', this.dialogGuidanceService);\n this.services.set('Discussion', this.discussionService);\n this.services.set('Draw', this.drawService);\n this.services.set('Embedded', this.embeddedService);\n this.services.set('Graph', this.graphService);\n this.services.set('Label', this.labelService);\n this.services.set('Match', this.matchService);\n this.services.set('MultipleChoice', this.multipleChoiceService);\n this.services.set('OpenResponse', this.openResponseService);\n this.services.set('OutsideURL', this.outsideURLService);\n this.services.set('PeerChat', this.peerChatService);\n this.services.set('HTML', this.htmlService);\n this.services.set('ShowGroupWork', this.showGroupWorkService);\n this.services.set('ShowMyWork', this.showMyWorkService);\n this.services.set('Summary', this.summaryService);\n this.services.set('Table', this.tableService);\n }\n\n getService(componentType: string): any {\n return this.services.get(componentType);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "aiChatService",
+ "type": "AiChatService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "animationService",
+ "type": "AnimationService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "audioOscillatorService",
+ "type": "AudioOscillatorService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "conceptMapService",
+ "type": "ConceptMapService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "dialogGuidanceService",
+ "type": "DialogGuidanceService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "discussionService",
+ "type": "DiscussionService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "drawService",
+ "type": "DrawService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "embeddedService",
+ "type": "EmbeddedService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "graphService",
+ "type": "GraphService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "labelService",
+ "type": "LabelService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "matchService",
+ "type": "MatchService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "multipleChoiceService",
+ "type": "MultipleChoiceService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "openResponseService",
+ "type": "OpenResponseService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "outsideURLService",
+ "type": "OutsideURLService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "peerChatService",
+ "type": "PeerChatService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "htmlService",
+ "type": "HTMLService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "showGroupWorkService",
+ "type": "ShowGroupWorkService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "showMyWorkService",
+ "type": "ShowMyWorkService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "summaryService",
+ "type": "SummaryService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "tableService",
+ "type": "TableService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 25,
+ "jsdoctags": [
+ {
+ "name": "aiChatService",
+ "type": "AiChatService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "animationService",
+ "type": "AnimationService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "audioOscillatorService",
+ "type": "AudioOscillatorService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "conceptMapService",
+ "type": "ConceptMapService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "dialogGuidanceService",
+ "type": "DialogGuidanceService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "discussionService",
+ "type": "DiscussionService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "drawService",
+ "type": "DrawService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "embeddedService",
+ "type": "EmbeddedService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "graphService",
+ "type": "GraphService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "labelService",
+ "type": "LabelService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "matchService",
+ "type": "MatchService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "multipleChoiceService",
+ "type": "MultipleChoiceService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "openResponseService",
+ "type": "OpenResponseService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "outsideURLService",
+ "type": "OutsideURLService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "peerChatService",
+ "type": "PeerChatService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "htmlService",
+ "type": "HTMLService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "showGroupWorkService",
+ "type": "ShowGroupWorkService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "showMyWorkService",
+ "type": "ShowMyWorkService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "summaryService",
+ "type": "SummaryService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "tableService",
+ "type": "TableService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "ComponentTypeService",
+ "id": "injectable-ComponentTypeService-5295afd0249f4b9895d8a543e5dba181499f26c7410b066a94e017a8341cbaebcf24b7849d62f62fc994b6420688033d1d377058eef9ac016bf018122aa76fdd",
+ "file": "src/assets/wise5/services/componentTypeService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "getComponentTypeLabel",
+ "args": [
+ {
+ "name": "componentType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getComponentTypes",
+ "args": [],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 14,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isAiChatAllowed",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 46,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { ComponentServiceLookupService } from './componentServiceLookupService';\nimport { UserService } from '../../../app/services/user.service';\nimport { ConfigService } from './configService';\n\n@Injectable()\nexport class ComponentTypeService {\n constructor(\n private componentServiceLookupService: ComponentServiceLookupService,\n private configService: ConfigService,\n private userService: UserService\n ) {}\n\n getComponentTypes(): any[] {\n const componentTypes = [\n { type: 'Animation', name: this.getComponentTypeLabel('Animation') },\n { type: 'AudioOscillator', name: this.getComponentTypeLabel('AudioOscillator') },\n { type: 'ConceptMap', name: this.getComponentTypeLabel('ConceptMap') },\n { type: 'DialogGuidance', name: this.getComponentTypeLabel('DialogGuidance') },\n { type: 'Discussion', name: this.getComponentTypeLabel('Discussion') },\n { type: 'Draw', name: this.getComponentTypeLabel('Draw') },\n { type: 'Embedded', name: this.getComponentTypeLabel('Embedded') },\n { type: 'Graph', name: this.getComponentTypeLabel('Graph') },\n { type: 'Label', name: this.getComponentTypeLabel('Label') },\n { type: 'Match', name: this.getComponentTypeLabel('Match') },\n { type: 'MultipleChoice', name: this.getComponentTypeLabel('MultipleChoice') },\n { type: 'OpenResponse', name: this.getComponentTypeLabel('OpenResponse') },\n { type: 'OutsideURL', name: this.getComponentTypeLabel('OutsideURL') },\n { type: 'PeerChat', name: this.getComponentTypeLabel('PeerChat') },\n { type: 'HTML', name: this.getComponentTypeLabel('HTML') },\n { type: 'ShowGroupWork', name: this.getComponentTypeLabel('ShowGroupWork') },\n { type: 'ShowMyWork', name: this.getComponentTypeLabel('ShowMyWork') },\n { type: 'Summary', name: this.getComponentTypeLabel('Summary') },\n { type: 'Table', name: this.getComponentTypeLabel('Table') }\n ];\n if (this.isAiChatAllowed()) {\n componentTypes.unshift({ type: 'AiChat', name: this.getComponentTypeLabel('AiChat') });\n }\n return componentTypes;\n }\n\n getComponentTypeLabel(componentType: string): string {\n return this.componentServiceLookupService.getService(componentType).getComponentTypeLabel();\n }\n\n private isAiChatAllowed(): boolean {\n return (\n this.configService.getConfigParam('chatGptEnabled') &&\n (this.userService.isAdmin() ||\n this.userService.isResearcher() ||\n this.userService.isTrustedAuthor())\n );\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "componentServiceLookupService",
+ "type": "ComponentServiceLookupService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "userService",
+ "type": "UserService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 7,
+ "jsdoctags": [
+ {
+ "name": "componentServiceLookupService",
+ "type": "ComponentServiceLookupService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "userService",
+ "type": "UserService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "ComputerAvatarService",
+ "id": "injectable-ComputerAvatarService-9a29833f332fa250003371ac6aa9af580d49caf9f11200621ae499da21bc8f97dfc2281802ed57b848a7769986c98552ab2f77703f9022fe7a83bebffa03f770",
+ "file": "src/assets/wise5/services/computerAvatarService.ts",
+ "properties": [
+ {
+ "name": "avatars",
+ "defaultValue": "[\n new ComputerAvatar('person1', $localize`:A name for a computer avatar:Ermina`, 'person-1.png'),\n new ComputerAvatar('person2', $localize`:A name for a computer avatar:Alyx`, 'person-2.png'),\n new ComputerAvatar('person3', $localize`:A name for a computer avatar:Kai`, 'person-3.png'),\n new ComputerAvatar('person4', $localize`:A name for a computer avatar:Morgan`, 'person-4.png'),\n new ComputerAvatar('person5', $localize`:A name for a computer avatar:Parker`, 'person-5.png'),\n new ComputerAvatar('person6', $localize`:A name for a computer avatar:Milan`, 'person-6.png'),\n new ComputerAvatar('person7', $localize`:A name for a computer avatar:Emery`, 'person-7.png'),\n new ComputerAvatar('person8', $localize`:A name for a computer avatar:Yuna`, 'person-8.png'),\n new ComputerAvatar('robot1', $localize`:A name for a computer avatar:Ada`, 'robot-1.png'),\n new ComputerAvatar('robot2', $localize`:A name for a computer avatar:Nico`, 'robot-2.png')\n ]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "ComputerAvatar[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "avatarsPath",
+ "defaultValue": "'/assets/img/computer-avatars/'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 20
+ }
+ ],
+ "methods": [
+ {
+ "name": "getAvatar",
+ "args": [
+ {
+ "name": "id",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "ComputerAvatar",
+ "typeParameters": [],
+ "line": 22,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "id",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAvatars",
+ "args": [],
+ "optional": false,
+ "returnType": "ComputerAvatar[]",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getAvatarsPath",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getDefaultAvatar",
+ "args": [],
+ "optional": false,
+ "returnType": "ComputerAvatar",
+ "typeParameters": [],
+ "line": 34,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getDefaultComputerAvatarLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 47,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getDefaultComputerAvatarSettings",
+ "args": [],
+ "optional": false,
+ "returnType": "ComputerAvatarSettings",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { ComputerAvatar } from '../common/computer-avatar/ComputerAvatar';\nimport { copy } from '../common/object/object';\nimport { ComputerAvatarSettings } from '../common/computer-avatar/ComputerAvatarSettings';\n\n@Injectable()\nexport class ComputerAvatarService {\n avatars: ComputerAvatar[] = [\n new ComputerAvatar('person1', $localize`:A name for a computer avatar:Ermina`, 'person-1.png'),\n new ComputerAvatar('person2', $localize`:A name for a computer avatar:Alyx`, 'person-2.png'),\n new ComputerAvatar('person3', $localize`:A name for a computer avatar:Kai`, 'person-3.png'),\n new ComputerAvatar('person4', $localize`:A name for a computer avatar:Morgan`, 'person-4.png'),\n new ComputerAvatar('person5', $localize`:A name for a computer avatar:Parker`, 'person-5.png'),\n new ComputerAvatar('person6', $localize`:A name for a computer avatar:Milan`, 'person-6.png'),\n new ComputerAvatar('person7', $localize`:A name for a computer avatar:Emery`, 'person-7.png'),\n new ComputerAvatar('person8', $localize`:A name for a computer avatar:Yuna`, 'person-8.png'),\n new ComputerAvatar('robot1', $localize`:A name for a computer avatar:Ada`, 'robot-1.png'),\n new ComputerAvatar('robot2', $localize`:A name for a computer avatar:Nico`, 'robot-2.png')\n ];\n avatarsPath: string = '/assets/img/computer-avatars/';\n\n getAvatar(id: string): ComputerAvatar {\n return this.avatars.find((avatar) => avatar.id === id);\n }\n\n getAvatars(): ComputerAvatar[] {\n return copy(this.avatars);\n }\n\n getAvatarsPath(): string {\n return this.avatarsPath;\n }\n\n getDefaultAvatar(): ComputerAvatar {\n return this.getAvatar('robot1');\n }\n\n getDefaultComputerAvatarSettings(): ComputerAvatarSettings {\n return {\n ids: this.getAvatars().map((avatar) => avatar.id),\n label: this.getDefaultComputerAvatarLabel(),\n prompt: $localize`Discuss your answer with a thought buddy!`,\n initialResponse: $localize`Hi there! It's nice to meet you. What do you think about...`\n };\n }\n\n getDefaultComputerAvatarLabel(): string {\n return $localize`Thought Buddy`;\n }\n}\n",
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "ConceptMapService",
+ "id": "injectable-ConceptMapService-d7f04d2a0bfbe11120f86cddcd835c1655a377d6d3f369f4c66d265018f6f965d82c31fb1c2f66405606d3a34341ee1c612538a3506bb66cf0122b2a031ec74d",
+ "file": "src/assets/wise5/components/conceptMap/conceptMapService.ts",
+ "properties": [
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "all",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "ruleNames",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 523,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if all the rules are satisfied\nfalse if any of the rules are not satisfied\n",
+ "description": "Check if all the rules are satisfied\nfalse if any of the rules are not satisfied
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 14827,
+ "end": 14843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14821,
+ "end": 14826,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the concept map component content
\n"
+ },
+ {
+ "name": {
+ "pos": 14890,
+ "end": 14904,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "conceptMapData"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14884,
+ "end": 14889,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the concept map student data
\n"
+ },
+ {
+ "name": {
+ "pos": 14946,
+ "end": 14955,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "ruleNames"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14940,
+ "end": 14945,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an array of rule names
\n"
+ },
+ {
+ "tagName": {
+ "pos": 14985,
+ "end": 14992,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "true if all the rules are satisifed\nfalse if any of the rules are not satisfied
\n"
+ }
+ ]
+ },
+ {
+ "name": "any",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "ruleNames",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 506,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if any of the rules are satisfied\nfalse if none of the rules are satisified\n",
+ "description": "Check if any of the rules are satisfied\nfalse if none of the rules are satisified
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 14258,
+ "end": 14274,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14252,
+ "end": 14257,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the concept map component content
\n"
+ },
+ {
+ "name": {
+ "pos": 14321,
+ "end": 14335,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "conceptMapData"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14315,
+ "end": 14320,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the concept map student data
\n"
+ },
+ {
+ "name": {
+ "pos": 14377,
+ "end": 14386,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "ruleNames"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14371,
+ "end": 14376,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an array of rule names
\n"
+ },
+ {
+ "tagName": {
+ "pos": 14416,
+ "end": 14423,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "true if any of the rules are satisifed\nfalse if none of the rules are satisified
\n"
+ }
+ ]
+ },
+ {
+ "name": "calculateDistance",
+ "args": [
+ {
+ "name": "x1",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "y1",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "x2",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "y2",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 194,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCalculate the euclidean distance between two points\n",
+ "description": "Calculate the euclidean distance between two points
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 5239,
+ "end": 5241,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "x1"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5233,
+ "end": 5238,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "x position of the first point
\n"
+ },
+ {
+ "name": {
+ "pos": 5284,
+ "end": 5286,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "y1"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5278,
+ "end": 5283,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "y position of the first point
\n"
+ },
+ {
+ "name": {
+ "pos": 5329,
+ "end": 5331,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "x2"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5323,
+ "end": 5328,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "x position of the second point
\n"
+ },
+ {
+ "name": {
+ "pos": 5375,
+ "end": 5377,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "y2"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5369,
+ "end": 5374,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "y position of the second point
\n"
+ },
+ {
+ "tagName": {
+ "pos": 5415,
+ "end": 5422,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the distance between the two points
\n"
+ }
+ ]
+ },
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 976,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the component state has student work. Sometimes a component\nstate may be created if the student visits a component but doesn't\nactually perform any work. This is where we will check if the student\nactually performed any work.\n",
+ "description": "Check if the component state has student work. Sometimes a component\nstate may be created if the student visits a component but doesn't\nactually perform any work. This is where we will check if the student\nactually performed any work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 29057,
+ "end": 29071,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 29051,
+ "end": 29056,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state object
\n"
+ },
+ {
+ "name": {
+ "pos": 29111,
+ "end": 29127,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 29105,
+ "end": 29110,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "tagName": {
+ "pos": 29156,
+ "end": 29162,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the component state has any work
\n"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 41,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createImage",
+ "args": [
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "width",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "height",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 730,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate an image from the concept map data\n",
+ "description": "Create an image from the concept map data
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 20730,
+ "end": 20744,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "conceptMapData"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 20724,
+ "end": 20729,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "concept map data from a student
\n"
+ },
+ {
+ "name": {
+ "pos": 20789,
+ "end": 20794,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "width"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 20783,
+ "end": 20788,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the width of the image we want to create
\n"
+ },
+ {
+ "name": {
+ "pos": 20848,
+ "end": 20854,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "height"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 20842,
+ "end": 20847,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the height of the image we want to create
\n"
+ }
+ ]
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 1196,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "annotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "evaluateRule",
+ "args": [
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "rule",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 283,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nEvaluate a rule\n",
+ "description": "Evaluate a rule
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 7993,
+ "end": 8007,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "conceptMapData"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 7987,
+ "end": 7992,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the concept map student data
\n"
+ },
+ {
+ "name": {
+ "pos": 8049,
+ "end": 8053,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "rule"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 8043,
+ "end": 8048,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the rule object
\n"
+ },
+ {
+ "tagName": {
+ "pos": 8076,
+ "end": 8083,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether the rule was satisfied
\n"
+ }
+ ]
+ },
+ {
+ "name": "evaluateRuleByRuleName",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "ruleName",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 205,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nEvaluate a rule name\n",
+ "description": "Evaluate a rule name
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 5651,
+ "end": 5667,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5645,
+ "end": 5650,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 5702,
+ "end": 5716,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "conceptMapData"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5696,
+ "end": 5701,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student concept map data
\n"
+ },
+ {
+ "name": {
+ "pos": 5758,
+ "end": 5766,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "ruleName"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5752,
+ "end": 5757,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the rule name
\n"
+ },
+ {
+ "tagName": {
+ "pos": 5787,
+ "end": 5794,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether the rule was satisfied
\n"
+ }
+ ]
+ },
+ {
+ "name": "generateImageFromRenderedComponentState",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 1100,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nThe component state has been rendered in a element\nand now we want to take a snapshot of the work.\n",
+ "description": "The component state has been rendered in a element\nand now we want to take a snapshot of the work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 32914,
+ "end": 32928,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 32908,
+ "end": 32913,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The component state that has been rendered.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 32979,
+ "end": 32985,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "A promise that will return an image object.
\n"
+ }
+ ]
+ },
+ {
+ "name": "getBase64Image",
+ "args": [
+ {
+ "name": "imageHref",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 929,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the Base64 image from an image href. An image href will look like\n/wise/curriculum/25/assets/Sun.png\nand the Base64 image\n",
+ "description": "Get the Base64 image from an image href. An image href will look like\n/wise/curriculum/25/assets/Sun.png\nand the Base64 image
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 27460,
+ "end": 27469,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "imageHref"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 27454,
+ "end": 27459,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the image href
\n"
+ },
+ {
+ "tagName": {
+ "pos": 27491,
+ "end": 27497,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a promise that will return an object containing the image href\nand the Base64 image
\n"
+ }
+ ]
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 21,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getConceptMapContainerId",
+ "args": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 29,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getFeedbackContainerId",
+ "args": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 37,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getHrefToBase64ImageReplacements",
+ "args": [
+ {
+ "name": "svgString",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "prependAssetsPath",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 852,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet Base64 images from image hrefs\nto the image references\ncontain an image href and a Base64 image.\n",
+ "description": "Get Base64 images from image hrefs\nto the image references\ncontain an image href and a Base64 image.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 25042,
+ "end": 25051,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "svgString"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 25036,
+ "end": 25041,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the svg string
\n"
+ },
+ {
+ "name": {
+ "pos": 25079,
+ "end": 25096,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "prependAssetsPath"
+ },
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "pos": 25073,
+ "end": 25078,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "whether to prepend the assets directory path\nto the image references
\n"
+ },
+ {
+ "tagName": {
+ "pos": 25177,
+ "end": 25183,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a promise that will return an array of objects. The objects will\ncontain an image href and a Base64 image.
\n"
+ }
+ ]
+ },
+ {
+ "name": "getImagesInSVG",
+ "args": [
+ {
+ "name": "svgString",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 888,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet all the image hrefs in the svg string\n",
+ "description": "Get all the image hrefs in the svg string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 26257,
+ "end": 26266,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "svgString"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 26251,
+ "end": 26256,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the svg string
\n"
+ },
+ {
+ "tagName": {
+ "pos": 26288,
+ "end": 26294,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "an array of image hrefs
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLinksByLabels",
+ "args": [
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeLabel",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "linkLabel",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "otherNodeLabel",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 467,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet links with the given source node label, link label, and destination\nnode label\ndestination node label\n",
+ "description": "Get links with the given source node label, link label, and destination\nnode label\ndestination node label
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 13091,
+ "end": 13105,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "conceptMapData"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 13085,
+ "end": 13090,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the concept map student data
\n"
+ },
+ {
+ "name": {
+ "pos": 13147,
+ "end": 13156,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeLabel"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 13141,
+ "end": 13146,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the source node label
\n"
+ },
+ {
+ "name": {
+ "pos": 13191,
+ "end": 13200,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "linkLabel"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 13185,
+ "end": 13190,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the link label
\n"
+ },
+ {
+ "name": {
+ "pos": 13228,
+ "end": 13242,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "otherNodeLabel"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 13222,
+ "end": 13227,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the destination node label
\n"
+ },
+ {
+ "tagName": {
+ "pos": 13276,
+ "end": 13283,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the links with the given source node label, link label, and\ndestination node label
\n"
+ }
+ ]
+ },
+ {
+ "name": "getLinksFromConceptMapData",
+ "args": [
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 1012,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getNextAvailableId",
+ "args": [
+ {
+ "name": "objects",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "prefix",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 1179,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nFor example the prefix for 'studentNode3' would be\n'studentNode'\n",
+ "description": "For example the prefix for 'studentNode3' would be\n'studentNode'
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 35726,
+ "end": 35733,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "objects"
+ },
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 35720,
+ "end": 35725,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "An array of nodes or links.
\n"
+ },
+ {
+ "name": {
+ "pos": 35774,
+ "end": 35780,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "prefix"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 35768,
+ "end": 35773,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The prefix for the given type of objects\nFor example the prefix for 'studentNode3' would be\n'studentNode'
\n"
+ }
+ ]
+ },
+ {
+ "name": "getNodeById",
+ "args": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "id",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 704,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet a node by id.\n",
+ "description": "Get a node by id.
\n",
+ "jsdoctags": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": {
+ "pos": 20178,
+ "end": 20180,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "id"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 20172,
+ "end": 20177,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 20199,
+ "end": 20206,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the node with the given id or null
\n"
+ }
+ ]
+ },
+ {
+ "name": "getNodesByLabel",
+ "args": [
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "label",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 444,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet nodes by label\n",
+ "description": "Get nodes by label
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 12509,
+ "end": 12523,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "conceptMapData"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 12503,
+ "end": 12508,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the concept map student data
\n"
+ },
+ {
+ "name": {
+ "pos": 12565,
+ "end": 12570,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "label"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 12559,
+ "end": 12564,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node label to look for
\n"
+ },
+ {
+ "tagName": {
+ "pos": 12604,
+ "end": 12611,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "all the nodes with the given label
\n"
+ }
+ ]
+ },
+ {
+ "name": "getNodesFromConceptMapData",
+ "args": [
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 1004,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getRuleByRuleName",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "ruleName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 404,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet a rule by the rule name\n",
+ "description": "Get a rule by the rule name
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 11435,
+ "end": 11451,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 11429,
+ "end": 11434,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the concept map component content
\n"
+ },
+ {
+ "name": {
+ "pos": 11498,
+ "end": 11506,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "ruleName"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 11492,
+ "end": 11497,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the rule name
\n"
+ },
+ {
+ "tagName": {
+ "pos": 11527,
+ "end": 11534,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the rule with the given rule name
\n"
+ }
+ ]
+ },
+ {
+ "name": "getRulesByCategoryName",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "category",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 424,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the rules in the category\n",
+ "description": "Get the rules in the category
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 11942,
+ "end": 11958,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 11936,
+ "end": 11941,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 11993,
+ "end": 12001,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "category"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 11987,
+ "end": 11992,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the category name
\n"
+ },
+ {
+ "tagName": {
+ "pos": 12026,
+ "end": 12033,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the rules in the category
\n"
+ }
+ ]
+ },
+ {
+ "name": "getSelectNodeBarId",
+ "args": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 33,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getSlope",
+ "args": [
+ {
+ "name": "x1",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "y1",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "x2",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "y2",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 175,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the slope of the line between two points\n",
+ "description": "Get the slope of the line between two points
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 4659,
+ "end": 4661,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "x1"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4653,
+ "end": 4658,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "x position of the first point
\n"
+ },
+ {
+ "name": {
+ "pos": 4704,
+ "end": 4706,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "y1"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4698,
+ "end": 4703,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "y position of the first point
\n"
+ },
+ {
+ "name": {
+ "pos": 4749,
+ "end": 4751,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "x2"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4743,
+ "end": 4748,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "x position of the second point
\n"
+ },
+ {
+ "name": {
+ "pos": 4795,
+ "end": 4797,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "y2"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4789,
+ "end": 4794,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "y position of the second point
\n"
+ },
+ {
+ "tagName": {
+ "pos": 4835,
+ "end": 4842,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the slope of the line or null if the slope is infinite
\n"
+ }
+ ]
+ },
+ {
+ "name": "getSVGId",
+ "args": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 25,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasAnyNodeOrLink",
+ "args": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "links",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 1000,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "links",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasComponentStateWithIsSubmitTrue",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 71,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasStarterConceptMap",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 1020,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isAllLinksEqual",
+ "args": [
+ {
+ "name": "links1",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "links2",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 1060,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "links1",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "links2",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isAllNodesEqual",
+ "args": [
+ {
+ "name": "nodes1",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodes2",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 1047,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodes1",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodes2",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 60,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isLatestComponentStateHasConceptMapData",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 87,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isLinkMatchingSourceLinkDestination",
+ "args": [
+ {
+ "name": "link",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "sourceLabel",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "linkLabel",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "destinationLabel",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 485,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "link",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "sourceLabel",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "linkLabel",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "destinationLabel",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isLinksEqual",
+ "args": [
+ {
+ "name": "link1",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "link2",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 1082,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "link1",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "link2",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isNodesEqual",
+ "args": [
+ {
+ "name": "node1",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node2",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 1073,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node1",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node2",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isStudentConceptMapDifferentThanStarterConceptMap",
+ "args": [
+ {
+ "name": "studentConceptMap",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "starterConceptMap",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 1032,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the student concept map is different than the starter conept map\nconcept map\n",
+ "description": "Check if the student concept map is different than the starter conept map\nconcept map
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 30822,
+ "end": 30839,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "studentConceptMap"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 30816,
+ "end": 30821,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student concept map
\n"
+ },
+ {
+ "name": {
+ "pos": 30876,
+ "end": 30893,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "starterConceptMap"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 30870,
+ "end": 30875,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the authored starter concept map
\n"
+ },
+ {
+ "tagName": {
+ "pos": 30933,
+ "end": 30939,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the student concept map is different than the starter\nconcept map
\n"
+ }
+ ]
+ },
+ {
+ "name": "moveLinkTextToFront",
+ "args": [
+ {
+ "name": "links",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 641,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "links",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "moveNodesToFront",
+ "args": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 647,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "newConceptMapLink",
+ "args": [
+ {
+ "name": "draw",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "id",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "originalId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "sourceNode",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "destinationNode",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "label",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "color",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "curvature",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "startCurveUp",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "startCurveDown",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 141,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate an instance of the ConceptMapLink class\n",
+ "description": "Create an instance of the ConceptMapLink class
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3828,
+ "end": 3832,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "draw"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3822,
+ "end": 3827,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the svg.js draw object
\n"
+ },
+ {
+ "name": {
+ "pos": 3868,
+ "end": 3870,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "id"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3862,
+ "end": 3867,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the link id
\n"
+ },
+ {
+ "name": "originalId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "sourceNode",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "destinationNode",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "label",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "color",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "curvature",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "startCurveUp",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "startCurveDown",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "tagName": {
+ "pos": 4045,
+ "end": 4052,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "a ConceptMapLink
\n"
+ }
+ ]
+ },
+ {
+ "name": "newConceptMapNode",
+ "args": [
+ {
+ "name": "draw",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "id",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "originalId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "filePath",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "label",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "x",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "y",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "width",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "height",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "showLabel",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 106,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate an instance of the ConceptMapNode class\n",
+ "description": "Create an instance of the ConceptMapNode class
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2998,
+ "end": 3002,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "draw"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2992,
+ "end": 2997,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the svg.js draw object
\n"
+ },
+ {
+ "name": {
+ "pos": 3038,
+ "end": 3040,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "id"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3032,
+ "end": 3037,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": "originalId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": {
+ "pos": 3065,
+ "end": 3073,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "filePath"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3059,
+ "end": 3064,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the file path of the image
\n"
+ },
+ {
+ "name": {
+ "pos": 3113,
+ "end": 3118,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "label"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3107,
+ "end": 3112,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the label of the node
\n"
+ },
+ {
+ "name": {
+ "pos": 3153,
+ "end": 3154,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "x"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3147,
+ "end": 3152,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the x coordinate
\n"
+ },
+ {
+ "name": {
+ "pos": 3184,
+ "end": 3185,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "y"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3178,
+ "end": 3183,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the y coordinate
\n"
+ },
+ {
+ "name": {
+ "pos": 3215,
+ "end": 3220,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "width"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3209,
+ "end": 3214,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the width of the image
\n"
+ },
+ {
+ "name": {
+ "pos": 3256,
+ "end": 3262,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "height"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3250,
+ "end": 3255,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the height of the image
\n"
+ },
+ {
+ "name": {
+ "pos": 3299,
+ "end": 3308,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "showLabel"
+ },
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3293,
+ "end": 3298,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "whether to show the label
\n"
+ }
+ ]
+ },
+ {
+ "name": "populateConceptMapData",
+ "args": [
+ {
+ "name": "draw",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "conceptMapData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 538,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nPopulate the concept map data into the component\nof nodes and an array of links\n",
+ "description": "Populate the concept map data into the component\nof nodes and an array of links
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 15452,
+ "end": 15456,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "draw"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 15446,
+ "end": 15451,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the SVG draw div
\n"
+ },
+ {
+ "name": {
+ "pos": 15486,
+ "end": 15500,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "conceptMapData"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 15480,
+ "end": 15485,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the concept map data which contains an array\nof nodes and an array of links
\n"
+ }
+ ]
+ },
+ {
+ "name": "refreshLinkLabels",
+ "args": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "links",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 661,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nRefresh the link labels so that the rectangles around the text\nlabels are resized to fit the text properly. This is required because\nthe rectangles are not properly sized when the ConceptMapLinks are\ninitialized. The rectangles need to be rendered first and then the\nlabels need to be set in order for the rectangles to be resized properly.\n",
+ "description": "Refresh the link labels so that the rectangles around the text\nlabels are resized to fit the text properly. This is required because\nthe rectangles are not properly sized when the ConceptMapLinks are\ninitialized. The rectangles need to be rendered first and then the\nlabels need to be set in order for the rectangles to be resized properly.
\n",
+ "jsdoctags": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "links",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "'use strict';\n\nimport SVG from 'svg.js';\nimport { ComponentService } from '../componentService';\nimport { ConfigService } from '../../services/configService';\nimport { StudentAssetService } from '../../services/studentAssetService';\nimport ConceptMapNode from './conceptMapNode';\nimport ConceptMapLink from './conceptMapLink';\nimport { Injectable } from '@angular/core';\nimport { convertToPNGFile } from '../../common/canvas/canvas';\n\n@Injectable()\nexport class ConceptMapService extends ComponentService {\n constructor(\n private ConfigService: ConfigService,\n private StudentAssetService: StudentAssetService\n ) {\n super();\n }\n\n getComponentTypeLabel(): string {\n return $localize`Concept Map`;\n }\n\n getSVGId(domIdEnding: string): string {\n return this.getElementId('svg', domIdEnding);\n }\n\n getConceptMapContainerId(domIdEnding: string): string {\n return this.getElementId('concept-map-container', domIdEnding);\n }\n\n getSelectNodeBarId(domIdEnding: string): string {\n return this.getElementId('select-node-bar', domIdEnding);\n }\n\n getFeedbackContainerId(domIdEnding: string): string {\n return this.getElementId('feedback-container', domIdEnding);\n }\n\n createComponent() {\n const component: any = super.createComponent();\n component.type = 'ConceptMap';\n component.width = 800;\n component.height = 600;\n component.background = null;\n component.stretchBackground = null;\n component.nodes = [];\n component.linksTitle = '';\n component.links = [];\n component.rules = [];\n component.starterConceptMap = null;\n component.customRuleEvaluator = '';\n component.showAutoScore = false;\n component.showAutoFeedback = false;\n component.showNodeLabels = true;\n return component;\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any) {\n if (componentStates != null && componentStates.length > 0) {\n if (this.isSubmitRequired(node, component)) {\n return this.hasComponentStateWithIsSubmitTrue(componentStates);\n } else {\n return this.isLatestComponentStateHasConceptMapData(componentStates);\n }\n }\n return false;\n }\n\n hasComponentStateWithIsSubmitTrue(componentStates: any[]) {\n for (let i = componentStates.length - 1; i >= 0; i--) {\n const componentState = componentStates[i];\n if (componentState.isSubmit && componentState.studentData) {\n if (\n componentState.isSubmit == true ||\n (componentState.studentData.submitCounter != null &&\n componentState.studentData.submitCounter > 0)\n ) {\n return true;\n }\n }\n }\n return false;\n }\n\n isLatestComponentStateHasConceptMapData(componentStates: any[]) {\n const componentState = componentStates[componentStates.length - 1];\n const studentData = componentState.studentData;\n return studentData != null && studentData.conceptMapData != null;\n }\n\n /**\n * Create an instance of the ConceptMapNode class\n * @param draw the svg.js draw object\n * @param id the node id\n * @param filePath the file path of the image\n * @param label the label of the node\n * @param x the x coordinate\n * @param y the y coordinate\n * @param width the width of the image\n * @param height the height of the image\n * @param showLabel whether to show the label\n * @param a ConceptMapNode\n */\n newConceptMapNode(\n draw: any,\n id: string,\n originalId: string,\n filePath: string,\n label: string,\n x: number,\n y: number,\n width: number,\n height: number,\n showLabel: boolean\n ) {\n return new ConceptMapNode(\n draw,\n id,\n originalId,\n filePath,\n label,\n x,\n y,\n width,\n height,\n showLabel\n );\n }\n\n /**\n * Create an instance of the ConceptMapLink class\n * @param draw the svg.js draw object\n * @param id the link id\n * @param node the source ConceptMapNode that the link is coming out of\n * @param x the x position of the tail\n * @param y the y position of the tail\n * @returns a ConceptMapLink\n */\n newConceptMapLink(\n draw: any,\n id: string,\n originalId: string = null,\n sourceNode: string = null,\n destinationNode: string = null,\n label: string = null,\n color: string = null,\n curvature: number = null,\n startCurveUp: boolean = null,\n startCurveDown: boolean = null\n ) {\n return new ConceptMapLink(\n draw,\n id,\n originalId,\n sourceNode,\n destinationNode,\n label,\n color,\n curvature,\n startCurveUp,\n startCurveDown\n );\n }\n\n /**\n * Get the slope of the line between two points\n * @param x1 x position of the first point\n * @param y1 y position of the first point\n * @param x2 x position of the second point\n * @param y2 y position of the second point\n * @returns the slope of the line or null if the slope is infinite\n */\n getSlope(x1: number, y1: number, x2: number, y2: number) {\n let slope = null;\n if (x2 - x1 == 0) {\n // the slope is infinite so we will return null\n slope = null;\n } else {\n slope = (y2 - y1) / (x2 - x1);\n }\n return slope;\n }\n\n /**\n * Calculate the euclidean distance between two points\n * @param x1 x position of the first point\n * @param y1 y position of the first point\n * @param x2 x position of the second point\n * @param y2 y position of the second point\n * @returns the distance between the two points\n */\n calculateDistance(x1: number, y1: number, x2: number, y2: number) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n }\n\n /**\n * Evaluate a rule name\n * @param componentContent the component content\n * @param conceptMapData the student concept map data\n * @param ruleName the rule name\n * @returns whether the rule was satisfied\n */\n evaluateRuleByRuleName(componentContent: any, conceptMapData: any, ruleName: any) {\n let result = false;\n\n if (ruleName === true) {\n // the rule name is not actually a rule but is the true boolean\n return true;\n } else if (ruleName === false) {\n // the rule name is not actually a rule but is the false boolean\n return false;\n }\n\n // get the rule\n const rule = this.getRuleByRuleName(componentContent, ruleName);\n\n if (rule == null) {\n /*\n * we didn't find a rule with the given rule name so we will look\n * for a category with that name\n */\n\n // get the rules that are in the category\n const rules = this.getRulesByCategoryName(componentContent, ruleName);\n\n let firstRule = true;\n\n if (rules != null) {\n /*\n * loop through all the rules in the category. we will say the\n * category is satisfied if all the rules in the category\n * evaluate to true.\n */\n for (let r = 0; r < rules.length; r++) {\n const tempRule = rules[r];\n\n // evaluate the rule\n const tempResult = this.evaluateRule(conceptMapData, tempRule);\n\n if (firstRule) {\n /*\n * this is the first rule so we will set the value\n * of the rule to the result\n */\n result = tempResult;\n firstRule = false;\n } else {\n /*\n * this is not the first rule so we will compute the\n * \"logical and\" of the result so far and this rule's\n * result\n */\n result = result && tempResult;\n }\n\n if (!result) {\n /*\n * the result is false so we can short circuit and\n * stop looping since we have now just found that\n * one of the rules is not satisfied which means\n * the category is not satisfied.\n */\n break;\n }\n }\n }\n } else {\n // evaluate the rule\n result = this.evaluateRule(conceptMapData, rule);\n }\n\n return result;\n }\n\n /**\n * Evaluate a rule\n * @param conceptMapData the concept map student data\n * @param rule the rule object\n * @returns whether the rule was satisfied\n */\n evaluateRule(conceptMapData: any, rule: any) {\n let result = false;\n\n if (rule != null) {\n if (rule.type == 'node') {\n // this is a node rule\n\n // get the node we are looking for\n const nodeLabel = rule.nodeLabel;\n\n // get all the nodes with the given label\n const nodes = this.getNodesByLabel(conceptMapData, nodeLabel);\n\n // get the number of nodes with the given label\n const nodeCount = nodes.length;\n\n /*\n * the comparison for the number which can be \"exactly\",\n * \"more than\", or \"less than\"\n */\n const comparison = rule.comparison;\n\n // the number to compare to\n const number = rule.number;\n\n if (comparison == 'exactly') {\n /*\n * we are looking for an exact number of nodes with the\n * given label\n */\n if (nodeCount == number) {\n result = true;\n }\n } else if (comparison == 'more than') {\n /*\n * we are looking for more than a certain number of nodes\n * with the given label\n */\n if (nodeCount > number) {\n result = true;\n }\n } else if (comparison == 'less than') {\n /*\n * we are looking for less than a certain number of nodes\n * with the given label\n */\n if (nodeCount < number) {\n result = true;\n }\n }\n\n if (rule.not) {\n /*\n * the rule is satisfied if the result is false so we will\n * negate the result\n */\n result = !result;\n }\n } else if (rule.type == 'link') {\n // this is a link rule\n\n // get the source node label\n const nodeLabel = rule.nodeLabel;\n\n // get the link label\n const linkLabel = rule.linkLabel;\n\n // get the destination node label\n const otherNodeLabel = rule.otherNodeLabel;\n\n // get all the links with the matching labels\n const links = this.getLinksByLabels(conceptMapData, nodeLabel, linkLabel, otherNodeLabel);\n\n // get the number of links with the matching labels\n const linkCount = links.length;\n\n /*\n * the comparison for the number which can be \"exactly\",\n * \"more than\", or \"less than\"\n */\n const comparison = rule.comparison;\n\n // the number to compare to\n const number = rule.number;\n\n if (comparison == 'exactly') {\n // we are looking for an exact number of links\n if (linkCount == number) {\n result = true;\n }\n } else if (comparison == 'more than') {\n // we are looking for more than a certain number of links\n if (linkCount > number) {\n result = true;\n }\n } else if (comparison == 'less than') {\n // we are looking for less than a certain number of links\n if (linkCount < number) {\n result = true;\n }\n }\n\n if (rule.not) {\n /*\n * the rule is satisfied if the result is false so we will\n * negate the result\n */\n result = !result;\n }\n }\n }\n\n return result;\n }\n\n /**\n * Get a rule by the rule name\n * @param componentContent the concept map component content\n * @param ruleName the rule name\n * @returns the rule with the given rule name\n */\n getRuleByRuleName(componentContent: any, ruleName: string) {\n const rules = componentContent.rules;\n if (rules != null) {\n for (const rule of rules) {\n if (rule != null) {\n if (ruleName == rule.name) {\n return rule;\n }\n }\n }\n }\n return null;\n }\n\n /**\n * Get the rules in the category\n * @param componentContent the component content\n * @param category the category name\n * @returns the rules in the category\n */\n getRulesByCategoryName(componentContent: any, category: string) {\n const rules = [];\n const tempRules = componentContent.rules;\n if (tempRules != null) {\n for (const tempRule of tempRules) {\n const categories = tempRule.categories;\n if (categories != null && categories.includes(category)) {\n rules.push(tempRule);\n }\n }\n }\n return rules;\n }\n\n /**\n * Get nodes by label\n * @param conceptMapData the concept map student data\n * @param label the node label to look for\n * @returns all the nodes with the given label\n */\n getNodesByLabel(conceptMapData: any, label: string) {\n const nodesByLabel = [];\n const nodes = conceptMapData.nodes;\n if (nodes != null) {\n for (const node of nodes) {\n if (label === node.label || label == 'any') {\n nodesByLabel.push(node);\n }\n }\n }\n return nodesByLabel;\n }\n\n /**\n * Get links with the given source node label, link label, and destination\n * node label\n * @param conceptMapData the concept map student data\n * @param nodeLabel the source node label\n * @param linkLabel the link label\n * @param otherNodeLabel the destination node label\n * @returns the links with the given source node label, link label, and\n * destination node label\n */\n getLinksByLabels(\n conceptMapData: any,\n nodeLabel: string,\n linkLabel: string,\n otherNodeLabel: string\n ) {\n const resultLinks = [];\n const links = conceptMapData.links;\n if (links != null) {\n for (const link of links) {\n if (this.isLinkMatchingSourceLinkDestination(link, nodeLabel, linkLabel, otherNodeLabel)) {\n resultLinks.push(link);\n }\n }\n }\n return resultLinks;\n }\n\n isLinkMatchingSourceLinkDestination(\n link: any,\n sourceLabel: string,\n linkLabel: string,\n destinationLabel: string\n ) {\n return (\n (sourceLabel === link.sourceNodeLabel || sourceLabel === 'any') &&\n (linkLabel === link.label || linkLabel === 'any') &&\n (destinationLabel === link.destinationNodeLabel || destinationLabel === 'any')\n );\n }\n\n /**\n * Check if any of the rules are satisfied\n * @param componentContent the concept map component content\n * @param conceptMapData the concept map student data\n * @param ruleNames an array of rule names\n * @returns true if any of the rules are satisifed\n * false if none of the rules are satisified\n */\n any(componentContent: any, conceptMapData: any, ruleNames: any) {\n for (const ruleName of ruleNames) {\n if (this.evaluateRuleByRuleName(componentContent, conceptMapData, ruleName)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Check if all the rules are satisfied\n * @param componentContent the concept map component content\n * @param conceptMapData the concept map student data\n * @param ruleNames an array of rule names\n * @returns true if all the rules are satisifed\n * false if any of the rules are not satisfied\n */\n all(componentContent: any, conceptMapData: any, ruleNames: any) {\n let result = true;\n for (const ruleName of ruleNames) {\n const ruleResult = this.evaluateRuleByRuleName(componentContent, conceptMapData, ruleName);\n result = result && ruleResult;\n }\n return result;\n }\n\n /**\n * Populate the concept map data into the component\n * @param draw the SVG draw div\n * @param conceptMapData the concept map data which contains an array\n * of nodes and an array of links\n */\n populateConceptMapData(draw: any, conceptMapData: any) {\n if (conceptMapData != null) {\n // get the JSON nodes\n const nodes = conceptMapData.nodes;\n\n // this is used to hold the SVG node objects\n const conceptMapNodes = [];\n\n if (nodes != null) {\n // loop through all the nodes\n for (let n = 0; n < nodes.length; n++) {\n const node = nodes[n];\n\n const instanceId = node.instanceId;\n const originalId = node.originalId;\n const filePath = node.fileName;\n const label = node.label;\n const x = node.x;\n const y = node.y;\n const width = node.width;\n const height = node.height;\n const showLabel = true;\n\n // create a ConceptMapNode\n const conceptMapNode = this.newConceptMapNode(\n draw,\n instanceId,\n originalId,\n filePath,\n label,\n x,\n y,\n width,\n height,\n showLabel\n );\n\n conceptMapNodes.push(conceptMapNode);\n }\n }\n\n // get the JSON links\n const links = conceptMapData.links;\n\n // this is used to hold the SVG link objects\n const conceptMapLinks = [];\n\n if (links != null) {\n // loop through all the links\n for (let l = 0; l < links.length; l++) {\n const link = links[l];\n\n const instanceId = link.instanceId;\n const originalId = link.originalId;\n const sourceNodeId = link.sourceNodeInstanceId;\n const destinationNodeId = link.destinationNodeInstanceId;\n const label = link.label;\n const color = link.color;\n const curvature = link.curvature;\n const startCurveUp = link.startCurveUp;\n const endCurveUp = link.endCurveUp;\n let sourceNode = null;\n let destinationNode = null;\n\n if (sourceNodeId != null) {\n sourceNode = this.getNodeById(conceptMapNodes, sourceNodeId);\n }\n\n if (destinationNodeId != null) {\n destinationNode = this.getNodeById(conceptMapNodes, destinationNodeId);\n }\n\n // create a ConceptMapLink\n const conceptMapLink = this.newConceptMapLink(\n draw,\n instanceId,\n originalId,\n sourceNode,\n destinationNode,\n label,\n color,\n curvature,\n startCurveUp,\n endCurveUp\n );\n\n conceptMapLinks.push(conceptMapLink);\n }\n }\n\n /*\n * move the link text group to the front so that they are on top\n * of links\n */\n this.moveLinkTextToFront(conceptMapLinks);\n\n // move the nodes to the front so that they are on top of links\n this.moveNodesToFront(conceptMapNodes);\n\n this.refreshLinkLabels(conceptMapNodes, conceptMapLinks);\n }\n }\n\n moveLinkTextToFront(links: any[]): void {\n for (const link of links) {\n link.moveTextGroupToFront();\n }\n }\n\n moveNodesToFront(nodes: any[]): void {\n for (const node of nodes) {\n const group = node.getGroup();\n group.front();\n }\n }\n\n /**\n * Refresh the link labels so that the rectangles around the text\n * labels are resized to fit the text properly. This is required because\n * the rectangles are not properly sized when the ConceptMapLinks are\n * initialized. The rectangles need to be rendered first and then the\n * labels need to be set in order for the rectangles to be resized properly.\n */\n refreshLinkLabels(nodes: any[], links: any[]) {\n if (nodes != null) {\n // loop through all the nodes\n for (let n = 0; n < nodes.length; n++) {\n const node = nodes[n];\n\n if (node != null) {\n // get the label from the node\n const label = node.getLabel();\n\n /*\n * set the label back into the node so that the rectangle\n * around the text label is resized to the text\n */\n node.setLabel(label);\n }\n }\n }\n\n if (links != null) {\n // loop throgh all the links\n for (let l = 0; l < links.length; l++) {\n const link = links[l];\n\n if (link != null) {\n // get the label from the link\n const label = link.getLabel();\n\n /*\n * set the label back into the link so that the rectangle\n * around the text label is resized to the text\n */\n link.setLabel(label);\n }\n }\n }\n }\n\n /**\n * Get a node by id.\n * @param id the node id\n * @returns the node with the given id or null\n */\n getNodeById(nodes: any[], id: string) {\n let node = null;\n\n if (id != null) {\n // loop through all the nodes\n for (let n = 0; n < nodes.length; n++) {\n const tempNode = nodes[n];\n const tempNodeId = tempNode.getId();\n\n if (id == tempNodeId) {\n // we have found the node we want\n node = tempNode;\n break;\n }\n }\n }\n\n return node;\n }\n\n /**\n * Create an image from the concept map data\n * @param conceptMapData concept map data from a student\n * @param width the width of the image we want to create\n * @param height the height of the image we want to create\n */\n createImage(conceptMapData: any, width: any, height: any) {\n return new Promise((resolve, reject) => {\n // create a div to draw the SVG in\n const svgElement = document.createElement('div');\n\n if (width == null || width == '') {\n // we will default to a width of 800 pixels\n width = 800;\n }\n\n if (height == null || height == '') {\n // we will default to a height of 600 pixels\n height = 600;\n }\n\n const draw: any = SVG(svgElement);\n draw.width(width);\n draw.height(height);\n\n if (svgElement != null) {\n // populate the concept map data into the svg draw element\n this.populateConceptMapData(draw, conceptMapData);\n\n // get the svg element as a string\n let svgString = svgElement.innerHTML;\n\n // find all the images in the svg and replace them with Base64 images\n this.getHrefToBase64ImageReplacements(svgString, true).then((images) => {\n /*\n * Loop through all the image objects. Each object contains\n * an image href and a Base64 image.\n */\n for (let i = 0; i < images.length; i++) {\n // get an image object\n const imagePair = images[i];\n\n // get the image href e.g. /wise/curriculum/25/assets/Sun.png\n let imageHref = imagePair.imageHref;\n\n // get the last index of '/'\n const lastIndexOfSlash = imageHref.lastIndexOf('/');\n\n if (lastIndexOfSlash != -1) {\n // only get everything after the last '/'\n imageHref = imageHref.substring(lastIndexOfSlash + 1);\n }\n\n // get the Base64 image\n const base64Image = imagePair.base64Image;\n\n // create a regex to match the image href\n const imageRegEx = new RegExp(imageHref, 'g');\n\n /*\n * replace all the instances of the image href with the\n * Base64 image\n */\n svgString = svgString.replace(imageRegEx, base64Image);\n }\n\n // create a canvas to draw the image on\n const myCanvas = document.createElement('canvas');\n const ctx = myCanvas.getContext('2d');\n\n // create an svg blob\n const svg = new Blob([svgString], { type: 'image/svg+xml;charset=utf-8' });\n const domURL: any = self.URL || (self as any).webkitURL || self;\n const url = domURL.createObjectURL(svg);\n const image = new Image();\n\n // the function that is called after the image is fully loaded\n image.onload = (event) => {\n // get the image that was loaded\n const image: any = event.target;\n\n // set the dimensions of the canvas\n myCanvas.width = image.width;\n myCanvas.height = image.height;\n ctx.drawImage(image, 0, 0);\n\n const pngFile = convertToPNGFile(myCanvas);\n this.StudentAssetService.uploadAsset(pngFile).then((unreferencedAsset) => {\n /*\n * make a copy of the unreferenced asset so that we\n * get a referenced asset\n */\n this.StudentAssetService.copyAssetForReference(unreferencedAsset).then(\n (referencedAsset) => {\n if (referencedAsset != null) {\n /*\n * get the asset url\n * for example\n * /wise/studentuploads/11261/297478/referenced/picture_1494016652542.png\n */\n const referencedAssetUrl = referencedAsset.url;\n\n // remove the unreferenced asset\n this.StudentAssetService.deleteAsset(unreferencedAsset);\n\n // resolve the promise with the image url\n resolve(referencedAssetUrl);\n }\n }\n );\n });\n };\n\n // set the src of the image so that the image gets loaded\n image.src = url;\n });\n }\n });\n }\n\n /**\n * Get Base64 images from image hrefs\n * @param svgString the svg string\n * @param prependAssetsPath whether to prepend the assets directory path\n * to the image references\n * @return a promise that will return an array of objects. The objects will\n * contain an image href and a Base64 image.\n */\n getHrefToBase64ImageReplacements(svgString: string, prependAssetsPath: boolean = false) {\n // an array to hold all the promises\n const promises = [];\n\n // get all the image hrefs\n const imageHrefs = this.getImagesInSVG(svgString);\n\n // loop through all the images\n for (let i = 0; i < imageHrefs.length; i++) {\n // get an image href\n let imageHref = imageHrefs[i];\n\n if (prependAssetsPath) {\n /*\n * the image href is relative so we need to make it absolute\n * so that the browser can retrieve it\n */\n\n // prepend the project asset directory path\n imageHref = this.ConfigService.getProjectAssetsDirectoryPath(true) + '/' + imageHref;\n }\n\n // get the Base64 of the image\n const promise = this.getBase64Image(imageHref);\n\n promises.push(promise);\n }\n\n return Promise.all(promises);\n }\n\n /**\n * Get all the image hrefs in the svg string\n * @param svgString the svg string\n * @return an array of image hrefs\n */\n getImagesInSVG(svgString: string) {\n const images = [];\n if (svgString != null) {\n /*\n * the regex to match href values in image elements\n * e.g.\n * if the svg contained in image element like this\n * \n * it would match it and the matching group would contain\n * /wise/curriculum/25/assets/Sun.png\n */\n const regex = //g;\n\n // find the first match in the svg string\n let result = regex.exec(svgString);\n\n while (result != null) {\n /*\n * get the href image from the match\n * e.g.\n * /wise/curriculum/25/assets/Sun.png\n */\n const imageHref = result[1];\n\n // add the href to our array of hrefs\n images.push(imageHref);\n\n // try to find the next match\n result = regex.exec(svgString);\n }\n }\n return images;\n }\n\n /**\n * Get the Base64 image from an image href. An image href will look like\n * /wise/curriculum/25/assets/Sun.png\n * @param imageHref the image href\n * @return a promise that will return an object containing the image href\n * and the Base64 image\n */\n getBase64Image(imageHref: string) {\n return new Promise((resolve, reject) => {\n // create the image object that we will load the image into\n const image = new Image();\n\n // create a new canvas to render the image in\n const myCanvas = document.createElement('canvas');\n const ctx = myCanvas.getContext('2d');\n\n // the function that is called after the image is fully loaded\n image.onload = function (event) {\n // get the image that was loaded\n const image: any = event.target;\n\n // set the canvas dimensions to match the image\n myCanvas.width = image.width;\n myCanvas.height = image.height;\n\n // draw the image in the canvas\n ctx.drawImage(image, 0, 0);\n\n // get the Base64 string of the canvas\n const base64Image = myCanvas.toDataURL('image/png');\n\n // create an object that will contain the image href and Base64 image\n const result: any = {};\n result.imageHref = imageHref;\n result.base64Image = base64Image;\n\n // resolve the promise with the object\n resolve(result);\n };\n\n // load the image\n image.src = imageHref;\n });\n }\n\n /**\n * Check if the component state has student work. Sometimes a component\n * state may be created if the student visits a component but doesn't\n * actually perform any work. This is where we will check if the student\n * actually performed any work.\n * @param componentState the component state object\n * @param componentContent the component content\n * @return whether the component state has any work\n */\n componentStateHasStudentWork(componentState: any, componentContent: any) {\n if (componentState != null) {\n const studentData = componentState.studentData;\n if (studentData != null) {\n const conceptMapData = studentData.conceptMapData;\n const nodes = this.getNodesFromConceptMapData(conceptMapData);\n const links = this.getLinksFromConceptMapData(conceptMapData);\n if (componentContent == null) {\n return this.hasAnyNodeOrLink(nodes, links);\n } else {\n if (this.hasStarterConceptMap(componentContent)) {\n return this.isStudentConceptMapDifferentThanStarterConceptMap(\n conceptMapData,\n componentContent.starterConceptMap\n );\n } else {\n return this.hasAnyNodeOrLink(nodes, links);\n }\n }\n }\n }\n return false;\n }\n\n hasAnyNodeOrLink(nodes: any[], links: any[]) {\n return nodes.length > 0 || links.length > 0;\n }\n\n getNodesFromConceptMapData(conceptMapData: any) {\n let nodes = [];\n if (conceptMapData.nodes != null) {\n nodes = conceptMapData.nodes;\n }\n return nodes;\n }\n\n getLinksFromConceptMapData(conceptMapData: any) {\n let links = [];\n if (conceptMapData.links != null) {\n links = conceptMapData.links;\n }\n return links;\n }\n\n hasStarterConceptMap(componentContent: any) {\n const starterConceptMap = componentContent.starterConceptMap;\n return starterConceptMap != null && starterConceptMap != '';\n }\n\n /**\n * Check if the student concept map is different than the starter conept map\n * @param studentConceptMap the student concept map\n * @param starterConceptMap the authored starter concept map\n * @return whether the student concept map is different than the starter\n * concept map\n */\n isStudentConceptMapDifferentThanStarterConceptMap(\n studentConceptMap: any,\n starterConceptMap: any\n ) {\n if (studentConceptMap != null && starterConceptMap != null) {\n if (!this.isAllNodesEqual(studentConceptMap.nodes, starterConceptMap.nodes)) {\n return true;\n }\n if (!this.isAllLinksEqual(studentConceptMap.links, starterConceptMap.links)) {\n return true;\n }\n }\n return false;\n }\n\n isAllNodesEqual(nodes1: any[], nodes2: any[]) {\n if (nodes1.length === nodes2.length) {\n for (let n = 0; n < nodes1.length; n++) {\n if (!this.isNodesEqual(nodes1[n], nodes2[n])) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n }\n\n isAllLinksEqual(links1: any[], links2: any[]) {\n if (links1.length === links2.length) {\n for (let l = 0; l < links1.length; l++) {\n if (!this.isLinksEqual(links1[l], links2[l])) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n }\n\n isNodesEqual(node1: any, node2: any) {\n return (\n node1.originalId === node2.originalId &&\n node1.instanceId === node2.instanceId &&\n node1.x === node2.x &&\n node1.y === node2.y\n );\n }\n\n isLinksEqual(link1: any, link2: any) {\n return (\n link1.label === link2.label &&\n link1.originalId === link2.originalId &&\n link1.instanceId === link2.instanceId &&\n link1.sourceNodeOriginalId === link2.sourceNodeOriginalId &&\n link1.sourceNodeInstanceId === link2.sourceNodeInstanceId &&\n link1.destinationNodeOriginalId === link2.destinationNodeOriginalId &&\n link1.destinationNodeInstanceId === link2.destinationNodeInstanceId\n );\n }\n\n /**\n * The component state has been rendered in a element\n * and now we want to take a snapshot of the work.\n * @param componentState The component state that has been rendered.\n * @return A promise that will return an image object.\n */\n generateImageFromRenderedComponentState(componentState: any) {\n return new Promise((resolve, reject) => {\n // get the svg element. this will obtain an array.\n const id = this.getDomIdEnding(\n componentState.nodeId,\n componentState.componentId,\n componentState\n );\n let svgElement = document.querySelector(`#${this.getSVGId(id)}`);\n if (svgElement != null) {\n // get the svg element as a string\n const serializer = new XMLSerializer();\n let svgString = serializer.serializeToString(svgElement);\n\n // find all the images in the svg and replace them with Base64 images\n this.getHrefToBase64ImageReplacements(svgString).then((images) => {\n /*\n * Loop through all the image objects. Each object contains\n * an image href and a Base64 image.\n */\n for (let i = 0; i < images.length; i++) {\n // get an image object\n const imagePair = images[i];\n\n // get the image href e.g. /wise/curriculum/25/assets/Sun.png\n const imageHref = imagePair.imageHref;\n\n // get the Base64 image\n const base64Image = imagePair.base64Image;\n\n // create a regex to match the image href\n const imageRegEx = new RegExp(imageHref, 'g');\n\n /*\n * replace all the instances of the image href with the\n * Base64 image\n */\n svgString = svgString.replace(imageRegEx, base64Image);\n }\n\n // create a canvas to draw the image on\n const myCanvas = document.createElement('canvas');\n const ctx = myCanvas.getContext('2d');\n\n // create an svg blob\n const svg = new Blob([svgString], { type: 'image/svg+xml;charset=utf-8' });\n const domURL: any = self.URL || (self as any).webkitURL || self;\n const url = domURL.createObjectURL(svg);\n const image = new Image();\n\n // the function that is called after the image is fully loaded\n image.onload = (event) => {\n // get the image that was loaded\n let image: any = event.target;\n\n // set the dimensions of the canvas\n myCanvas.width = image.width;\n myCanvas.height = image.height;\n ctx.drawImage(image, 0, 0);\n\n const pngFile = convertToPNGFile(myCanvas);\n this.StudentAssetService.uploadAsset(pngFile).then((asset) => {\n resolve(asset);\n });\n };\n\n // set the src of the image so that the image gets loaded\n image.src = url;\n });\n }\n });\n }\n\n /**\n * @param objects An array of nodes or links.\n * @param prefix The prefix for the given type of objects\n * For example the prefix for 'studentNode3' would be\n * 'studentNode'\n */\n getNextAvailableId(objects: any[], prefix: string) {\n let nextAvailableNumber = 1;\n const usedNumbers = [];\n for (const object of objects) {\n const objectId = object.id;\n const objectIdNumber = parseInt(objectId.replace(prefix, ''));\n usedNumbers.push(objectIdNumber);\n }\n if (usedNumbers.length > 0) {\n const maxNumberUsed = Math.max.apply(Math, usedNumbers);\n if (!isNaN(maxNumberUsed)) {\n nextAvailableNumber = maxNumberUsed + 1;\n }\n }\n return prefix + nextAvailableNumber;\n }\n\n displayAnnotation(componentContent: any, annotation: any) {\n if (annotation.displayToStudent === false) {\n return false;\n } else {\n if (annotation.type == 'score') {\n } else if (annotation.type == 'comment') {\n } else if (annotation.type == 'autoScore') {\n return componentContent.showAutoScore;\n } else if (annotation.type == 'autoComment') {\n return componentContent.showAutoFeedback;\n }\n }\n return true;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "StudentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 13,
+ "jsdoctags": [
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "StudentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "ConfigService",
+ "id": "injectable-ConfigService-d250dcf7c6072d8f15a0f0d0dacff1c281732e060f78bb7a84f3c80b75b734f45741fc278bdde51e886cadafdfe46ef5d9c42a4108921f552a0f5e5e219adc82",
+ "file": "src/app/services/config.service.ts",
+ "properties": [
+ {
+ "name": "announcementUrl",
+ "defaultValue": "'/api/announcement'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "config$",
+ "defaultValue": "new BehaviorSubject(null)",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "BehaviorSubject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "timeDiff",
+ "defaultValue": "0",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "userConfigUrl",
+ "defaultValue": "'/api/user/config'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "getAnnouncement",
+ "args": [],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 79,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getAuthoringToolLink",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 84,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getConfig",
+ "args": [],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 16,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getContextPath",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getCurrentServerTime",
+ "args": [],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 75,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getDiscourseNewsCategory",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getDiscourseURL",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 34,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getGoogleAnalyticsId",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getGoogleClientId",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 50,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getGoogleTagManagerId",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 46,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getRecaptchaPublicKey",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 63,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getWISE4Hostname",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 71,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getWISEHostname",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 67,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isGoogleClassroomEnabled",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 54,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isRecaptchaEnabled",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 58,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "retrieveConfig",
+ "args": [],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 20,
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { BehaviorSubject, Observable, tap } from 'rxjs';\nimport { Config } from '../domain/config';\nimport { Announcement } from '../domain/announcement';\n\n@Injectable()\nexport class ConfigService {\n private userConfigUrl = '/api/user/config';\n private announcementUrl = '/api/announcement';\n private config$: BehaviorSubject = new BehaviorSubject(null);\n private timeDiff: number = 0;\n\n constructor(private http: HttpClient) {}\n\n getConfig(): Observable {\n return this.config$;\n }\n\n retrieveConfig(): Observable {\n const headers = new HttpHeaders({ 'Cache-Control': 'no-cache' });\n return this.http.get(this.userConfigUrl, { headers: headers }).pipe(\n tap((config) => {\n this.config$.next(config);\n this.timeDiff = Date.now() - config.currentTime;\n })\n );\n }\n\n getContextPath() {\n return this.config$.getValue().contextPath;\n }\n\n getDiscourseURL() {\n return this.config$.getValue().discourseURL;\n }\n\n getDiscourseNewsCategory() {\n return this.config$.getValue().discourseNewsCategory;\n }\n\n getGoogleAnalyticsId() {\n return this.config$.getValue().googleAnalyticsId;\n }\n\n getGoogleTagManagerId() {\n return this.config$.getValue().googleTagManagerId;\n }\n\n getGoogleClientId() {\n return this.config$.getValue().googleClientId;\n }\n\n isGoogleClassroomEnabled() {\n return this.config$.getValue().isGoogleClassroomEnabled;\n }\n\n isRecaptchaEnabled() {\n const recaptchaPublicKey = this.getRecaptchaPublicKey();\n return recaptchaPublicKey != null && recaptchaPublicKey != '';\n }\n\n getRecaptchaPublicKey() {\n return this.config$.getValue().recaptchaPublicKey;\n }\n\n getWISEHostname() {\n return this.config$.getValue().wiseHostname;\n }\n\n getWISE4Hostname() {\n return this.config$.getValue().wise4Hostname;\n }\n\n getCurrentServerTime() {\n return Date.now() - this.timeDiff;\n }\n\n getAnnouncement(): Observable {\n const headers = new HttpHeaders({ 'Cache-Control': 'no-cache' });\n return this.http.get(this.announcementUrl, { headers: headers }) as Observable;\n }\n\n getAuthoringToolLink(): string {\n return this.config$ != null ? `${this.getContextPath()}/teacher/edit/home` : '';\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 12,
+ "jsdoctags": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "ConfigService",
+ "id": "injectable-ConfigService-1d3f0f7044f8d8dcce42f99c1e4d34e8f1e4eb1b870fb9809b5fdfa931719e7356676df465bda42c8564b3d5e738f5ac0cf9255a13dd6627d73f97a7b7564317-1",
+ "file": "src/assets/wise5/services/configService.ts",
+ "properties": [
+ {
+ "name": "config",
+ "defaultValue": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "configRetrieved$",
+ "defaultValue": "this.configRetrievedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "configRetrievedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "calculateIsRunActive",
+ "args": [
+ {
+ "name": "configJSON",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 923,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "configJSON",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "compareClassmateUserInfosByWorkgroupId",
+ "args": [
+ {
+ "name": "a",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "b",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "1 | 0 | -1",
+ "typeParameters": [],
+ "line": 280,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nUsed to sort the classmate user infos by ascending workgroup id.\nUse by calling myArray.sort(compareClassmateUserInfosByWorkgroupId)\n1 if a comes after b\n0 if a equals b\n",
+ "description": "Used to sort the classmate user infos by ascending workgroup id.\nUse by calling myArray.sort(compareClassmateUserInfosByWorkgroupId)\n1 if a comes after b\n0 if a equals b
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 7238,
+ "end": 7239,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "a"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 7232,
+ "end": 7237,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "a user info object
\n"
+ },
+ {
+ "name": {
+ "pos": 7271,
+ "end": 7272,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "b"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 7265,
+ "end": 7270,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "a user info Object
\n"
+ },
+ {
+ "tagName": {
+ "pos": 7298,
+ "end": 7304,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "-1 if a comes before b\n1 if a comes after b\n0 if a equals b
\n"
+ }
+ ]
+ },
+ {
+ "name": "convertToClientTimestamp",
+ "args": [
+ {
+ "name": "serverTimestamp",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 599,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nConvert a server timestamp to a client timestamp. This is required\nin case the client and server clocks are not synchronized.\n",
+ "description": "Convert a server timestamp to a client timestamp. This is required\nin case the client and server clocks are not synchronized.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 16391,
+ "end": 16406,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "serverTimestamp"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 16385,
+ "end": 16390,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the client timestamp
\n"
+ }
+ ]
+ },
+ {
+ "name": "convertToServerTimestamp",
+ "args": [
+ {
+ "name": "clientTimestamp",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 588,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nConvert a client timestamp to a server timestamp. This is required\nin case the client and server clocks are not synchronized.\n",
+ "description": "Convert a client timestamp to a server timestamp. This is required\nin case the client and server clocks are not synchronized.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 15990,
+ "end": 16005,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "clientTimestamp"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 15984,
+ "end": 15989,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the client timestamp
\n"
+ }
+ ]
+ },
+ {
+ "name": "getAchievementsURL",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 99,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getAllUserInfoInPeriod",
+ "args": [
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 378,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAllUsersInPeriod",
+ "args": [
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 386,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAuthorableProjects",
+ "args": [],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 872,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet all the authorable projects\n",
+ "description": "Get all the authorable projects
\n"
+ },
+ {
+ "name": "getClassmateUserInfos",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 233,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getClassmateUserInfosSortedByWorkgroupId",
+ "args": [],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 258,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the classmate user infos sorted by ascending workgroup id\nworkgroup id\n",
+ "description": "Get the classmate user infos sorted by ascending workgroup id\nworkgroup id
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 6474,
+ "end": 6480,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "an array of classmate user info objects sorted by ascending\nworkgroup id
\n"
+ }
+ ]
+ },
+ {
+ "name": "getClassmateWorkgroupIds",
+ "args": [
+ {
+ "name": "includeSelf",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 341,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "includeSelf",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getConfigParam",
+ "args": [
+ {
+ "name": "paramName",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 91,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "paramName",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getContextPath",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 176,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getCRaterRequestURL",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 103,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getDisplayNamesByWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 504,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getDisplayUsernamesByWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 538,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getEndDate",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 949,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getFormattedEndDate",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 961,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getFormattedStartDate",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 957,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getLocale",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 168,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getMainHomePageURL",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 107,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getMode",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 172,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getMyUserInfo",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 217,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getMyUsername",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 225,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getNotebookURL",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getNotificationURL",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 111,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getNumberOfWorkgroupsInPeriod",
+ "args": [
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 444,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getPeriodId",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 180,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getPeriodIdByWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 453,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the period id for a workgroup id\n",
+ "description": "Get the period id for a workgroup id
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 12334,
+ "end": 12345,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 12328,
+ "end": 12333,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the workgroup id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 12369,
+ "end": 12376,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the period id the workgroup id is in
\n"
+ }
+ ]
+ },
+ {
+ "name": "getPeriods",
+ "args": [],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 188,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getPermissions",
+ "args": [],
+ "optional": false,
+ "returnType": "{ canViewStudentNames: boolean; canGradeStudentWork: boolean; canAuthorProject: boolean; }",
+ "typeParameters": [],
+ "line": 369,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getPrettyEndDate",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 941,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getProjectAssetsDirectoryPath",
+ "args": [
+ {
+ "name": "includeHost",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 804,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the project assets folder path\ne.g.\nwith host\nhttp://wise.berkeley.edu/wise/curriculum/3/assets\nwithout host\n/wise/curriculum/3/assets\n",
+ "description": "Get the project assets folder path\ne.g.\nwith host\nhttp://wise.berkeley.edu/wise/curriculum/3/assets \nwithout host\n/wise/curriculum/3/assets
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 22561,
+ "end": 22572,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "includeHost"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "pos": 22555,
+ "end": 22560,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "whether to include the host in the URL
\n"
+ },
+ {
+ "tagName": {
+ "pos": 22618,
+ "end": 22624,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "the project assets folder path\ne.g.\nwith host\nhttp://wise.berkeley.edu/wise/curriculum/3/assets \nwithout host\n/wise/curriculum/3/assets
\n"
+ }
+ ]
+ },
+ {
+ "name": "getProjectId",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getRunCode",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 119,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getRunId",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 115,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getRunName",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 123,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getSessionLogOutURL",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 131,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getSharedTeacherRole",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 704,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the shared teacher role for the run\n'write' or 'read'\n",
+ "description": "Get the shared teacher role for the run\n'write' or 'read'
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 19436,
+ "end": 19447,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 19430,
+ "end": 19435,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the workgroup id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 19471,
+ "end": 19478,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the shared teacher role for the run. the possible values are\n'write' or 'read'
\n"
+ }
+ ]
+ },
+ {
+ "name": "getSharedTeacherUserInfos",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 330,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the shared teacher user infos for the run\n",
+ "description": "Get the shared teacher user infos for the run
\n"
+ },
+ {
+ "name": "getSharedTeacherWorkgroupIds",
+ "args": [],
+ "optional": false,
+ "returnType": "number[]",
+ "typeParameters": [],
+ "line": 308,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getStartDate",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 945,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getStudentAssetsURL",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getStudentFirstNamesByWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 468,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the student names\n",
+ "description": "Get the student names
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 12705,
+ "end": 12716,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 12699,
+ "end": 12704,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the workgroup id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 12740,
+ "end": 12746,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "an array containing the student names
\n"
+ }
+ ]
+ },
+ {
+ "name": "getStudentMaxTotalAssetsSize",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getStudentStatusURL",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 139,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getStudentUploadsBaseURL",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getTeacherRole",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 689,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the teacher role for the run\n'owner', 'write', 'read'\n",
+ "description": "Get the teacher role for the run\n'owner', 'write', 'read'
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 19003,
+ "end": 19014,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 18997,
+ "end": 19002,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the workgroup id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 19038,
+ "end": 19045,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the role of the teacher for the run. the possible values are\n'owner', 'write', 'read'
\n"
+ }
+ ]
+ },
+ {
+ "name": "getTeacherUserInfo",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 316,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getTeacherUsername",
+ "args": [
+ {
+ "name": "userId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 632,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "userId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getTeacherWorkgroupId",
+ "args": [],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 300,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getTeacherWorkgroupIds",
+ "args": [],
+ "optional": false,
+ "returnType": "number[]",
+ "typeParameters": [],
+ "line": 290,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getUserId",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 209,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getUserIdsByWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 484,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getUserIdsStringByWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 561,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getUserInfo",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getUserInfoByWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 402,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getUsernameByWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 494,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getUsernamesByWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 514,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getUsernamesStringByWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 550,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getUsersNotInWorkgroupInPeriod",
+ "args": [
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 392,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getWebSocketURL",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 159,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getWISEBaseURL",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 164,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getWorkgroupId",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 201,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getWorkgroupsByPeriod",
+ "args": [
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 430,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isAuthoring",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 571,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isClassroomMonitor",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 579,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isEndedAndLocked",
+ "args": [
+ {
+ "name": "configJSON",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.config"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 933,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "configJSON",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.config",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isGoogleUser",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 968,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isPreview",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 567,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isRunActive",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 953,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isRunOwner",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.getWorkgroupId()"
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 650,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the workgroup is the owner of the run\n",
+ "description": "Check if the workgroup is the owner of the run
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 17878,
+ "end": 17889,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.getWorkgroupId()",
+ "tagName": {
+ "pos": 17872,
+ "end": 17877,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the workgroup id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 17913,
+ "end": 17920,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether the workgroup is the owner of the run
\n"
+ }
+ ]
+ },
+ {
+ "name": "isRunSharedTeacher",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.getWorkgroupId()"
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 667,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the workgroup is a shared teacher for the run\n",
+ "description": "Check if the workgroup is a shared teacher for the run
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 18356,
+ "end": 18367,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "workgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.getWorkgroupId()",
+ "tagName": {
+ "pos": 18350,
+ "end": 18355,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the workgroup id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 18391,
+ "end": 18398,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether the workgroup is a shared teacher of the run
\n"
+ }
+ ]
+ },
+ {
+ "name": "isSignedInUserATeacher",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 607,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isStudent",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.getWorkgroupId()"
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 603,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.getWorkgroupId()",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isStudentRun",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 575,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSwitchedUser",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 893,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nDetermines whether the current user is logged in as somebody else\n",
+ "description": "Determines whether the current user is logged in as somebody else
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 25512,
+ "end": 25518,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "true iff the user is a switched user
\n"
+ }
+ ]
+ },
+ {
+ "name": "isTeacherIdentifyingId",
+ "args": [
+ {
+ "name": "fieldName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "value",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 619,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "fieldName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "value",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isTeacherUserId",
+ "args": [
+ {
+ "name": "userId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 615,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "userId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isTeacherWorkgroupId",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 611,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "removeAbsoluteAssetPaths",
+ "args": [
+ {
+ "name": "html",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 835,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nRemove the absolute asset paths\ne.g.\n \nwill be changed to\n \n",
+ "description": "Remove the absolute asset paths\ne.g.\n \nwill be changed to\n
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 23600,
+ "end": 23604,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "html"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 23594,
+ "end": 23599,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the html
\n"
+ },
+ {
+ "tagName": {
+ "pos": 23620,
+ "end": 23626,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "the modified html without the absolute asset paths
\n"
+ }
+ ]
+ },
+ {
+ "name": "replaceStudentNames",
+ "args": [
+ {
+ "name": "content",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 727,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nReplace student names in the content.\nFor example, we will replace instances of {{firstStudentFirstName}}\nwith the actual first name of the first student in the workgroup.\n",
+ "description": "Replace student names in the content.\nFor example, we will replace instances of {{firstStudentFirstName}}\nwith the actual first name of the first student in the workgroup.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 20262,
+ "end": 20269,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "content"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 20256,
+ "end": 20261,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "a content object or string
\n"
+ },
+ {
+ "tagName": {
+ "pos": 20303,
+ "end": 20309,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "an updated content object or string
\n"
+ }
+ ]
+ },
+ {
+ "name": "retrieveConfig",
+ "args": [
+ {
+ "name": "configURL",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 28,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "configURL",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setClassmateDisplayNames",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 244,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "setConfig",
+ "args": [
+ {
+ "name": "config",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 22,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "config",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setTimestampDiff",
+ "args": [
+ {
+ "name": "configJSON",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 80,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "configJSON",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "sortByProjectId",
+ "args": [
+ {
+ "name": "projectA",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectB",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "1 | 0 | -1",
+ "typeParameters": [],
+ "line": 911,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nSort the objects by descending id.\n-1 if projectA comes after projectB\n0 if they are the same\n",
+ "description": "Sort the objects by descending id.\n-1 if projectA comes after projectB\n0 if they are the same
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 25811,
+ "end": 25819,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "projectA"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 25805,
+ "end": 25810,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an object with an id field
\n"
+ },
+ {
+ "name": {
+ "pos": 25859,
+ "end": 25867,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "projectB"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 25853,
+ "end": 25858,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an object with an id field
\n"
+ },
+ {
+ "tagName": {
+ "pos": 25901,
+ "end": 25907,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "1 if projectA comes before projectB\n-1 if projectA comes after projectB\n0 if they are the same
\n"
+ }
+ ]
+ },
+ {
+ "name": "sortClassmateUserInfosAlphabeticallyByName",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 361,
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "'use strict';\n\nimport { Inject, Injectable, LOCALE_ID } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable, Subject, tap } from 'rxjs';\nimport { formatDate } from '@angular/common';\nimport { isMatchingPeriods } from '../common/period/period';\nimport { millisecondsToDateTime } from '../common/datetime/datetime';\nimport { usernameComparator } from '../common/user/user';\n\n@Injectable()\nexport class ConfigService {\n public config: any = null;\n private configRetrievedSource: Subject = new Subject();\n public configRetrieved$: Observable = this.configRetrievedSource.asObservable();\n\n constructor(\n private http: HttpClient,\n @Inject(LOCALE_ID) private localeID: string\n ) {}\n\n setConfig(config) {\n this.config = config;\n this.sortClassmateUserInfosAlphabeticallyByName();\n this.setClassmateDisplayNames();\n }\n\n retrieveConfig(configURL: string) {\n return this.http.get(configURL).pipe(\n tap((configJSON: any) => {\n this.setTimestampDiff(configJSON);\n\n let constraints = true;\n\n const absURL = document.location.href;\n\n if (configJSON.mode === 'preview') {\n // constraints can only be disabled using the url in preview mode\n\n // regex to match constraints=false in the url\n const constraintsRegEx = new RegExp('constraints=false', 'gi');\n\n if (absURL != null && absURL.match(constraintsRegEx)) {\n // the url contains constraints=false\n constraints = false;\n }\n }\n\n // set the constraints value into the config so we can access it later\n configJSON.constraints = constraints;\n\n // regex to match showProjectPath=true in the url\n const showProjectPathRegEx = new RegExp('showProjectPath=true', 'gi');\n\n if (absURL != null && absURL.match(showProjectPathRegEx)) {\n // the url contains showProjectPath=true\n const host = location.origin;\n const projectURL = configJSON.projectURL;\n const projectPath = host + projectURL;\n console.log(projectPath);\n }\n\n configJSON.isRunActive = this.calculateIsRunActive(configJSON);\n\n this.setConfig(configJSON);\n\n if (this.isPreview()) {\n const myUserInfo = this.getMyUserInfo();\n if (myUserInfo != null) {\n // set the workgroup id to a random integer between 1 and 100\n myUserInfo.workgroupId = Math.floor(100 * Math.random()) + 1;\n }\n }\n this.configRetrievedSource.next(configJSON);\n return configJSON;\n })\n );\n }\n\n setTimestampDiff(configJSON) {\n if (configJSON.retrievalTimestamp != null) {\n const clientTimestamp = new Date().getTime();\n const serverTimestamp = configJSON.retrievalTimestamp;\n const timestampDiff = clientTimestamp - serverTimestamp;\n configJSON.timestampDiff = timestampDiff;\n } else {\n configJSON.timestampDiff = 0;\n }\n }\n\n getConfigParam(paramName) {\n if (this.config != null) {\n return this.config[paramName];\n } else {\n return null;\n }\n }\n\n getAchievementsURL() {\n return this.getConfigParam('achievementURL');\n }\n\n getCRaterRequestURL() {\n return this.getConfigParam('cRaterRequestURL');\n }\n\n getMainHomePageURL() {\n return this.getConfigParam('mainHomePageURL');\n }\n\n getNotificationURL() {\n return this.getConfigParam('notificationURL');\n }\n\n getRunId() {\n return this.getConfigParam('runId');\n }\n\n getRunCode() {\n return this.getConfigParam('runCode');\n }\n\n getRunName() {\n return this.getConfigParam('runName');\n }\n\n getProjectId() {\n return this.getConfigParam('projectId');\n }\n\n getSessionLogOutURL() {\n return this.getConfigParam('sessionLogOutURL');\n }\n\n getStudentAssetsURL() {\n return this.getConfigParam('studentAssetsURL');\n }\n\n getStudentStatusURL() {\n return this.getConfigParam('studentStatusURL');\n }\n\n getStudentMaxTotalAssetsSize() {\n return this.getConfigParam('studentMaxTotalAssetsSize');\n }\n\n getNotebookURL() {\n return this.getConfigParam('notebookURL');\n }\n\n getStudentUploadsBaseURL() {\n return this.getConfigParam('studentUploadsBaseURL');\n }\n\n getUserInfo() {\n return this.getConfigParam('userInfo');\n }\n\n getWebSocketURL() {\n const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';\n return `${protocol}//${window.location.host}${this.getContextPath()}/websocket`;\n }\n\n getWISEBaseURL() {\n return this.getConfigParam('wiseBaseURL');\n }\n\n getLocale() {\n return this.getConfigParam('locale') || 'en';\n }\n\n getMode() {\n return this.getConfigParam('mode');\n }\n\n getContextPath() {\n return this.getConfigParam('contextPath');\n }\n\n getPeriodId() {\n const myUserInfo = this.getMyUserInfo();\n if (myUserInfo != null) {\n return myUserInfo.periodId;\n }\n return null;\n }\n\n getPeriods(): any[] {\n const myUserInfo = this.getMyUserInfo();\n if (myUserInfo != null) {\n const myClassInfo = myUserInfo.myClassInfo;\n if (myClassInfo != null) {\n if (myClassInfo.periods != null) {\n return myClassInfo.periods;\n }\n }\n }\n return [];\n }\n\n getWorkgroupId() {\n const myUserInfo = this.getMyUserInfo();\n if (myUserInfo != null) {\n return myUserInfo.workgroupId;\n }\n return null;\n }\n\n getUserId() {\n const myUserInfo = this.getMyUserInfo();\n if (myUserInfo != null) {\n return myUserInfo.id;\n }\n return null;\n }\n\n getMyUserInfo() {\n const userInfo = this.getUserInfo();\n if (userInfo != null) {\n return userInfo.myUserInfo;\n }\n return null;\n }\n\n getMyUsername() {\n const myUserInfo = this.getMyUserInfo();\n if (myUserInfo != null) {\n return myUserInfo.username;\n }\n return null;\n }\n\n getClassmateUserInfos() {\n const myUserInfo = this.getMyUserInfo();\n if (myUserInfo != null) {\n const myClassInfo = myUserInfo.myClassInfo;\n if (myClassInfo != null) {\n return myClassInfo.classmateUserInfos;\n }\n }\n return null;\n }\n\n setClassmateDisplayNames() {\n let classmateUserInfos = this.getClassmateUserInfos();\n if (classmateUserInfos) {\n for (let workgroup of classmateUserInfos) {\n workgroup.displayNames = this.getDisplayUsernamesByWorkgroupId(workgroup.workgroupId);\n }\n }\n }\n\n /**\n * Get the classmate user infos sorted by ascending workgroup id\n * @return an array of classmate user info objects sorted by ascending\n * workgroup id\n */\n getClassmateUserInfosSortedByWorkgroupId() {\n const sortedClassmateUserInfos = [];\n const classmateUserInfos = this.getClassmateUserInfos();\n if (classmateUserInfos != null) {\n for (let classmateUserInfo of classmateUserInfos) {\n sortedClassmateUserInfos.push(classmateUserInfo);\n }\n }\n // sort the new classmate user infos array by ascending workgroup id\n sortedClassmateUserInfos.sort(this.compareClassmateUserInfosByWorkgroupId);\n return sortedClassmateUserInfos;\n }\n\n /**\n * Used to sort the classmate user infos by ascending workgroup id.\n * Use by calling myArray.sort(compareClassmateUserInfosByWorkgroupId)\n * @param a a user info object\n * @param b a user info Object\n * @return -1 if a comes before b\n * 1 if a comes after b\n * 0 if a equals b\n */\n compareClassmateUserInfosByWorkgroupId(a, b) {\n if (a.workgroupId < b.workgroupId) {\n return -1;\n } else if (a.workgroupId > b.workgroupId) {\n return 1;\n } else {\n return 0;\n }\n }\n\n getTeacherWorkgroupIds(): number[] {\n const teacherWorkgroupIds = [];\n const teacherWorkgroupId = this.getTeacherWorkgroupId();\n if (teacherWorkgroupId != null) {\n teacherWorkgroupIds.push(teacherWorkgroupId);\n }\n teacherWorkgroupIds.push(...this.getSharedTeacherWorkgroupIds());\n return teacherWorkgroupIds;\n }\n\n getTeacherWorkgroupId(): number {\n const teacherUserInfo = this.getTeacherUserInfo();\n if (teacherUserInfo != null) {\n return teacherUserInfo.workgroupId;\n }\n return null;\n }\n\n getSharedTeacherWorkgroupIds(): number[] {\n const workgroupIds = [];\n this.getSharedTeacherUserInfos().forEach((sharedTeacherUserInfo: any) => {\n workgroupIds.push(sharedTeacherUserInfo.workgroupId);\n });\n return workgroupIds;\n }\n\n getTeacherUserInfo() {\n const myUserInfo = this.getMyUserInfo();\n if (myUserInfo != null) {\n const myClassInfo = myUserInfo.myClassInfo;\n if (myClassInfo != null) {\n return myClassInfo.teacherUserInfo;\n }\n }\n return null;\n }\n\n /**\n * Get the shared teacher user infos for the run\n */\n getSharedTeacherUserInfos() {\n const myUserInfo = this.getMyUserInfo();\n if (myUserInfo != null) {\n const myClassInfo = myUserInfo.myClassInfo;\n if (myClassInfo != null) {\n return myClassInfo.sharedTeacherUserInfos;\n }\n }\n return [];\n }\n\n getClassmateWorkgroupIds(includeSelf = false) {\n const workgroupIds = [];\n if (includeSelf) {\n workgroupIds.push(this.getWorkgroupId());\n }\n const classmateUserInfos = this.getClassmateUserInfos();\n if (classmateUserInfos != null) {\n for (let classmateUserInfo of classmateUserInfos) {\n if (classmateUserInfo != null) {\n const workgroupId = classmateUserInfo.workgroupId;\n\n if (workgroupId != null) {\n workgroupIds.push(workgroupId);\n }\n }\n }\n }\n return workgroupIds;\n }\n\n sortClassmateUserInfosAlphabeticallyByName() {\n const classmateUserInfos = this.getClassmateUserInfos();\n if (classmateUserInfos != null) {\n classmateUserInfos.sort(usernameComparator);\n }\n return classmateUserInfos;\n }\n\n getPermissions() {\n // a switched user (admin/researcher user impersonating a teacher) should not be able to view/grade\n return {\n canViewStudentNames: this.config.canViewStudentNames && !this.isSwitchedUser(),\n canGradeStudentWork: this.config.canGradeStudentWork && !this.isSwitchedUser(),\n canAuthorProject: this.config.canAuthorProject && !this.isSwitchedUser()\n };\n }\n\n private getAllUserInfoInPeriod(periodId: number): any {\n return this.getClassmateUserInfos()\n .map((userInfo) => {\n return userInfo.periodId === periodId ? userInfo : [];\n })\n .flat();\n }\n\n getAllUsersInPeriod(periodId: number): any[] {\n return this.getAllUserInfoInPeriod(periodId)\n .map((userInfo) => userInfo.users)\n .flat();\n }\n\n getUsersNotInWorkgroupInPeriod(periodId: number): any[] {\n const users = [];\n this.getAllUserInfoInPeriod(periodId).forEach((userInfo) => {\n if (userInfo.workgroupId == null) {\n users.push(...userInfo.users);\n }\n });\n return users;\n }\n\n getUserInfoByWorkgroupId(workgroupId) {\n let userInfo = null;\n if (workgroupId != null) {\n const myUserInfo = this.getMyUserInfo();\n if (myUserInfo != null) {\n const tempWorkgroupId = myUserInfo.workgroupId;\n if (workgroupId === tempWorkgroupId) {\n userInfo = myUserInfo;\n }\n }\n if (userInfo == null) {\n const classmateUserInfos = this.getClassmateUserInfos();\n if (classmateUserInfos != null) {\n for (let classmateUserInfo of classmateUserInfos) {\n if (classmateUserInfo != null) {\n const tempWorkgroupId = classmateUserInfo.workgroupId;\n if (workgroupId == tempWorkgroupId) {\n userInfo = classmateUserInfo;\n break;\n }\n }\n }\n }\n }\n }\n return userInfo;\n }\n\n getWorkgroupsByPeriod(periodId) {\n const workgroupsInPeriod = [];\n const myUserInfo = this.getMyUserInfo();\n if (this.isStudent() && isMatchingPeriods(myUserInfo.periodId, periodId)) {\n workgroupsInPeriod.push(myUserInfo);\n }\n for (const classmateUserInfo of this.getClassmateUserInfos()) {\n if (isMatchingPeriods(classmateUserInfo.periodId, periodId)) {\n workgroupsInPeriod.push(classmateUserInfo);\n }\n }\n return workgroupsInPeriod;\n }\n\n getNumberOfWorkgroupsInPeriod(periodId) {\n return this.getWorkgroupsByPeriod(periodId).length;\n }\n\n /**\n * Get the period id for a workgroup id\n * @param workgroupId the workgroup id\n * @returns the period id the workgroup id is in\n */\n getPeriodIdByWorkgroupId(workgroupId) {\n if (workgroupId != null) {\n const userInfo = this.getUserInfoByWorkgroupId(workgroupId);\n if (userInfo != null) {\n return userInfo.periodId;\n }\n }\n return null;\n }\n\n /**\n * Get the student names\n * @param workgroupId the workgroup id\n * @return an array containing the student names\n */\n getStudentFirstNamesByWorkgroupId(workgroupId) {\n const studentNames = [];\n const usernames = this.getUsernameByWorkgroupId(workgroupId);\n if (usernames != null) {\n const usernamesSplit = usernames.split(':');\n if (usernamesSplit != null) {\n for (let username of usernamesSplit) {\n const indexOfSpace = username.indexOf(' ');\n const studentFirstName = username.substring(0, indexOfSpace);\n studentNames.push(studentFirstName);\n }\n }\n }\n return studentNames;\n }\n\n getUserIdsByWorkgroupId(workgroupId) {\n if (workgroupId != null) {\n const userInfo = this.getUserInfoByWorkgroupId(workgroupId);\n if (userInfo != null) {\n return userInfo.userIds;\n }\n }\n return [];\n }\n\n getUsernameByWorkgroupId(workgroupId) {\n if (workgroupId != null) {\n const userInfo = this.getUserInfoByWorkgroupId(workgroupId);\n if (userInfo != null) {\n return userInfo.username;\n }\n }\n return null;\n }\n\n getDisplayNamesByWorkgroupId(workgroupId) {\n if (workgroupId != null) {\n const userInfo = this.getUserInfoByWorkgroupId(workgroupId);\n if (userInfo != null) {\n return userInfo.displayNames;\n }\n }\n return null;\n }\n\n getUsernamesByWorkgroupId(workgroupId) {\n let usernamesObjects = [];\n if (workgroupId != null) {\n let userInfo = this.getUserInfoByWorkgroupId(workgroupId);\n if (userInfo != null && userInfo.username != null) {\n let usernames = userInfo.username.split(':');\n for (let name of usernames) {\n let id = '';\n let regex = /(.+) \\((.+)\\)/g;\n let matches = regex.exec(name);\n if (matches) {\n name = matches[1];\n id = matches[2];\n }\n usernamesObjects.push({\n name: name,\n id: id\n });\n }\n }\n }\n return usernamesObjects;\n }\n\n getDisplayUsernamesByWorkgroupId(workgroupId: number): string {\n let usernames = '';\n if (workgroupId != null) {\n if (this.getPermissions().canViewStudentNames) {\n usernames = this.getUsernamesStringByWorkgroupId(workgroupId);\n } else {\n usernames = this.getUserIdsStringByWorkgroupId(workgroupId);\n }\n }\n return usernames;\n }\n\n getUsernamesStringByWorkgroupId(workgroupId: number): string {\n const names = this.getUsernamesByWorkgroupId(workgroupId);\n return names.length > 0\n ? names\n .map(function (obj) {\n return obj.name;\n })\n .join(', ')\n : '';\n }\n\n getUserIdsStringByWorkgroupId(workgroupId: number): string {\n return this.getUserIdsByWorkgroupId(workgroupId)\n .map((id) => $localize`Student ${id}`)\n .join(', ');\n }\n\n isPreview() {\n return this.getMode() === 'preview';\n }\n\n isAuthoring() {\n return this.getMode() === 'author';\n }\n\n isStudentRun() {\n return this.getMode() === 'studentRun';\n }\n\n isClassroomMonitor() {\n return this.getMode() === 'classroomMonitor';\n }\n\n /**\n * Convert a client timestamp to a server timestamp. This is required\n * in case the client and server clocks are not synchronized.\n * @param clientTimestamp the client timestamp\n */\n convertToServerTimestamp(clientTimestamp) {\n const timestampDiff = this.getConfigParam('timestampDiff');\n const serverTimestamp = clientTimestamp - timestampDiff;\n return serverTimestamp;\n }\n\n /**\n * Convert a server timestamp to a client timestamp. This is required\n * in case the client and server clocks are not synchronized.\n * @param serverTimestamp the client timestamp\n */\n convertToClientTimestamp(serverTimestamp) {\n return serverTimestamp + this.getConfigParam('timestampDiff');\n }\n\n isStudent(workgroupId = this.getWorkgroupId()) {\n return !this.isRunOwner(workgroupId) && !this.isRunSharedTeacher();\n }\n\n isSignedInUserATeacher(): boolean {\n return this.isRunOwner() || this.isRunSharedTeacher();\n }\n\n isTeacherWorkgroupId(workgroupId: number): boolean {\n return this.isTeacherIdentifyingId('workgroupId', workgroupId);\n }\n\n isTeacherUserId(userId: number): boolean {\n return this.isTeacherIdentifyingId('userId', userId);\n }\n\n isTeacherIdentifyingId(fieldName: string, value: number): boolean {\n const teacherUserInfo = this.getTeacherUserInfo();\n if (teacherUserInfo == null) {\n return false;\n }\n if (teacherUserInfo[fieldName] === value) {\n return true;\n }\n return this.getSharedTeacherUserInfos().some((userInfo: any) => {\n return userInfo[fieldName] === value;\n });\n }\n\n getTeacherUsername(userId: number): string {\n const teacherUserInfo = this.getTeacherUserInfo();\n if (teacherUserInfo.userId === userId) {\n return teacherUserInfo.username;\n }\n for (const sharedTeacherUserInfo of this.getSharedTeacherUserInfos()) {\n if (sharedTeacherUserInfo.userId === userId) {\n return sharedTeacherUserInfo.username;\n }\n }\n return null;\n }\n\n /**\n * Check if the workgroup is the owner of the run\n * @param workgroupId the workgroup id\n * @returns whether the workgroup is the owner of the run\n */\n isRunOwner(workgroupId = this.getWorkgroupId()) {\n if (workgroupId != null) {\n const teacherUserInfo = this.getTeacherUserInfo();\n if (teacherUserInfo != null) {\n if (workgroupId == teacherUserInfo.workgroupId) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * Check if the workgroup is a shared teacher for the run\n * @param workgroupId the workgroup id\n * @returns whether the workgroup is a shared teacher of the run\n */\n isRunSharedTeacher(workgroupId = this.getWorkgroupId()) {\n if (workgroupId != null) {\n const sharedTeacherUserInfos = this.getSharedTeacherUserInfos();\n if (sharedTeacherUserInfos != null) {\n for (let sharedTeacherUserInfo of sharedTeacherUserInfos) {\n if (sharedTeacherUserInfo != null) {\n if (workgroupId == sharedTeacherUserInfo.workgroupId) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }\n\n /**\n * Get the teacher role for the run\n * @param workgroupId the workgroup id\n * @returns the role of the teacher for the run. the possible values are\n * 'owner', 'write', 'read'\n */\n getTeacherRole(workgroupId) {\n if (this.isRunOwner(workgroupId)) {\n return 'owner';\n } else if (this.isRunSharedTeacher(workgroupId)) {\n return this.getSharedTeacherRole(workgroupId);\n }\n return null;\n }\n\n /**\n * Get the shared teacher role for the run\n * @param workgroupId the workgroup id\n * @returns the shared teacher role for the run. the possible values are\n * 'write' or 'read'\n */\n getSharedTeacherRole(workgroupId) {\n if (workgroupId != null) {\n const sharedTeacherUserInfos = this.getSharedTeacherUserInfos();\n if (sharedTeacherUserInfos != null) {\n for (let sharedTeacherUserInfo of sharedTeacherUserInfos) {\n if (sharedTeacherUserInfo != null) {\n if (workgroupId == sharedTeacherUserInfo.workgroupId) {\n return sharedTeacherUserInfo.role;\n }\n }\n }\n }\n }\n return null;\n }\n\n /**\n * Replace student names in the content.\n * For example, we will replace instances of {{firstStudentFirstName}}\n * with the actual first name of the first student in the workgroup.\n * @param content a content object or string\n * @return an updated content object or string\n */\n replaceStudentNames(content) {\n if (content != null) {\n let contentString = content;\n if (typeof content === 'object') {\n contentString = JSON.stringify(content);\n }\n if (contentString != null) {\n const workgroupId = this.getWorkgroupId();\n const firstNames = this.getStudentFirstNamesByWorkgroupId(workgroupId);\n\n if (firstNames.length >= 1) {\n /*\n * there are 1 or more students in the workgroup so we can\n * replace the first student first name with the actual\n * name\n */\n contentString = contentString.replace(\n new RegExp('{{firstStudentFirstName}}', 'gi'),\n firstNames[0]\n );\n\n /*\n * there are 1 or more students in the workgroup so we can\n * replace the student first names with the actual names\n */\n contentString = contentString.replace(\n new RegExp('{{studentFirstNames}}', 'gi'),\n firstNames.join(', ')\n );\n }\n\n if (firstNames.length >= 2) {\n /*\n * there are 2 or more students in the workgroup so we can\n * replace the second student first name with the actual\n * name\n */\n contentString = contentString.replace(\n new RegExp('{{secondStudentFirstName}}', 'gi'),\n firstNames[1]\n );\n }\n\n if (firstNames.length >= 3) {\n /*\n * there are 3 or more students in the workgroup so we can\n * replace the third student first name with the actual\n * name\n */\n contentString = contentString.replace(\n new RegExp('{{thirdStudentFirstName}}', 'gi'),\n firstNames[2]\n );\n }\n }\n\n if (typeof content === 'object') {\n // convert the content string back into an object\n content = JSON.parse(contentString);\n } else if (typeof content === 'string') {\n // the content was a string so we can just use the content string\n content = contentString;\n }\n }\n return content;\n }\n\n /**\n * Get the project assets folder path\n * @param includeHost whether to include the host in the URL\n * @return the project assets folder path\n * e.g.\n * with host\n * http://wise.berkeley.edu/wise/curriculum/3/assets\n * without host\n * /wise/curriculum/3/assets\n */\n getProjectAssetsDirectoryPath(includeHost = false) {\n const projectBaseURL = this.getConfigParam('projectBaseURL');\n if (projectBaseURL != null) {\n if (includeHost) {\n const host = window.location.origin;\n\n /*\n * get the full path including the host\n * e.g. http://wise.berkeley.edu/wise/curriculum/3/assets\n */\n return host + projectBaseURL + 'assets';\n } else {\n /*\n * get the full path not including the host\n * e.g. /wise/curriculum/3/assets\n */\n return projectBaseURL + 'assets';\n }\n }\n return null;\n }\n\n /**\n * Remove the absolute asset paths\n * e.g.\n * \n * will be changed to\n * \n * @param html the html\n * @return the modified html without the absolute asset paths\n */\n removeAbsoluteAssetPaths(html) {\n /*\n * get the assets directory path with the host\n * e.g.\n * https://wise.berkeley.edu/wise/curriculum/3/assets/\n */\n const includeHost = true;\n const assetsDirectoryPathIncludingHost = this.getProjectAssetsDirectoryPath(includeHost);\n const assetsDirectoryPathIncludingHostRegEx = new RegExp(assetsDirectoryPathIncludingHost, 'g');\n\n /*\n * get the assets directory path without the host\n * e.g.\n * /wise/curriculum/3/assets/\n */\n const assetsDirectoryPathNotIncludingHost = this.getProjectAssetsDirectoryPath() + '/';\n const assetsDirectoryPathNotIncludingHostRegEx = new RegExp(\n assetsDirectoryPathNotIncludingHost,\n 'g'\n );\n\n /*\n * remove the directory path from the html so that only the file name\n * remains in asset references\n * e.g.\n * \n * will be changed to\n * \n */\n html = html.replace(assetsDirectoryPathIncludingHostRegEx, '');\n html = html.replace(assetsDirectoryPathNotIncludingHostRegEx, '');\n return html;\n }\n\n /**\n * Get all the authorable projects\n */\n getAuthorableProjects() {\n const ownedProjects = this.getConfigParam('projects');\n const sharedProjects = this.getConfigParam('sharedProjects');\n let authorableProjects = [];\n if (ownedProjects != null) {\n authorableProjects = authorableProjects.concat(ownedProjects);\n }\n\n if (sharedProjects != null) {\n authorableProjects = authorableProjects.concat(sharedProjects);\n }\n\n // sort the projects by descending id\n authorableProjects.sort(this.sortByProjectId);\n return authorableProjects;\n }\n\n /**\n * Determines whether the current user is logged in as somebody else\n * @return true iff the user is a switched user\n */\n isSwitchedUser() {\n let myUserInfo = this.getMyUserInfo();\n if (myUserInfo != null) {\n if (myUserInfo.isSwitchedUser) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Sort the objects by descending id.\n * @param projectA an object with an id field\n * @param projectB an object with an id field\n * @return 1 if projectA comes before projectB\n * -1 if projectA comes after projectB\n * 0 if they are the same\n */\n sortByProjectId(projectA, projectB) {\n const projectIdA = projectA.id;\n const projectIdB = projectB.id;\n if (projectIdA < projectIdB) {\n return 1;\n } else if (projectIdA > projectIdB) {\n return -1;\n } else {\n return 0;\n }\n }\n\n calculateIsRunActive(configJSON) {\n const currentTime = new Date().getTime();\n if (currentTime < this.convertToClientTimestamp(configJSON.startTime)) {\n return false;\n } else if (this.isEndedAndLocked(configJSON)) {\n return false;\n }\n return true;\n }\n\n isEndedAndLocked(configJSON = this.config) {\n return (\n configJSON.endTime != null &&\n new Date().getTime() > this.convertToClientTimestamp(configJSON.endTime) &&\n configJSON.isLockedAfterEndDate\n );\n }\n\n getPrettyEndDate(): string {\n return formatDate(this.getEndDate(), 'mediumDate', this.localeID);\n }\n\n getStartDate() {\n return this.config.startTime;\n }\n\n getEndDate() {\n return this.config.endTime;\n }\n\n isRunActive() {\n return this.config.isRunActive;\n }\n\n getFormattedStartDate() {\n return millisecondsToDateTime(this.getStartDate());\n }\n\n getFormattedEndDate() {\n if (this.getEndDate() != null) {\n return millisecondsToDateTime(this.getEndDate());\n }\n return '';\n }\n\n isGoogleUser() {\n return this.getMyUserInfo().isGoogleUser;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "localeID",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 15,
+ "jsdoctags": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "localeID",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable",
+ "isDuplicate": true,
+ "duplicateId": 1,
+ "duplicateName": "ConfigService-1"
+ },
+ {
+ "name": "ConstraintService",
+ "id": "injectable-ConstraintService-9100ba09b7ef7e974454227b820f7fa093a8fbcf36f6b6474e7adb868e0ed0a848042e0a112e85280e94c10d561e1514bd03f5cb684947b72635cc2b4ea635dd",
+ "file": "src/assets/wise5/services/constraintService.ts",
+ "properties": [
+ {
+ "name": "activeConstraints",
+ "defaultValue": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 34
+ },
+ {
+ "name": "constraintsUpdated$",
+ "defaultValue": "this.constraintsUpdatedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 36,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "constraintsUpdatedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 35,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "criteriaFunctionNameToStrategy",
+ "defaultValue": "{\n addXNumberOfNotesOnThisStep: new AddXNumberOfNotesOnThisStepConstraintStrategy(),\n branchPathTaken: new BranchPathTakenConstraintStrategy(),\n choiceChosen: new ChoiceChosenConstraintStrategy(),\n fillXNumberOfRows: new FillXNumberOfRowsConstraintStrategy(),\n hasTag: new HasTagConstraintStrategy(),\n isCompleted: new IsCompletedConstraintStrategy(),\n isCorrect: new IsCorrectConstraintStrategy(),\n isRevisedAfter: new IsRevisedAfterConstraintStrategy(),\n isVisible: new IsVisibleConstraintStrategy(),\n isVisitable: new IsVisitableConstraintStrategy(),\n isVisited: new IsVisitedConstraintStrategy(),\n isVisitedAfter: new IsVisitedAfterConstraintStrategy(),\n isVisitedAndRevisedAfter: new IsVisitedAndRevisedAfterConstraintStrategy(),\n score: new ScoreConstraintStrategy(),\n teacherRemoval: new TeacherRemovalConstraintStrategy(),\n usedXSubmits: new UsedXSubmitsConstraintStrategy(),\n wroteXNumberOfWords: new WroteXNumberOfWordsConstraintStrategy()\n }",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "object",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 37
+ },
+ {
+ "name": "evaluateConstraintContext",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "EvaluateConstraintContext",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 56
+ },
+ {
+ "name": "isNodeAffectedByConstraintResult",
+ "defaultValue": "{}",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 57
+ }
+ ],
+ "methods": [
+ {
+ "name": "cacheIsNodeAffectedByConstraintResult",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "constraintId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "result",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 232,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nRemember the result for whether the node is affected by the constraint\n",
+ "description": "Remember the result for whether the node is affected by the constraint
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 10003,
+ "end": 10009,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9997,
+ "end": 10002,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": {
+ "pos": 10034,
+ "end": 10046,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "constraintId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 10028,
+ "end": 10033,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the constraint id
\n"
+ },
+ {
+ "name": "result",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "clearActiveConstraints",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 265,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "constraintsComparatorGenerator",
+ "args": [
+ {
+ "name": "orderedNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 257,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate the constraints comparator function that is used for sorting an array of constraint\nobjects.\nup in the project.\n",
+ "description": "Create the constraints comparator function that is used for sorting an array of constraint\nobjects.\nup in the project.
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 10882,
+ "end": 10896,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "orderedNodeIds"
+ },
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 10876,
+ "end": 10881,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "An array of node ids in the order in which they show up in the project.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 10975,
+ "end": 10981,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "A comparator that orders constraint objects in the order in which the target ids show\nup in the project.
\n"
+ }
+ ]
+ },
+ {
+ "name": "evaluate",
+ "args": [
+ {
+ "name": "constraints",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]"
+ }
+ ],
+ "optional": false,
+ "returnType": "ConstraintEvaluationResult",
+ "typeParameters": [],
+ "line": 98,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "constraints",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "evaluateConstraint",
+ "args": [
+ {
+ "name": "constraint",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 130,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "constraint",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "evaluateCriteria",
+ "args": [
+ {
+ "name": "criteria",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "criteria",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "evaluateCriterias",
+ "args": [
+ {
+ "name": "criterias",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 157,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "criterias",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "evaluateMultipleRemovalCriteria",
+ "args": [
+ {
+ "name": "multipleRemovalCriteria",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "removalConditional",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 138,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "multipleRemovalCriteria",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "removalConditional",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "evaluateStrategy",
+ "args": [
+ {
+ "name": "criteria",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "strategy",
+ "type": "ConstraintStrategy",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 152,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "criteria",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "strategy",
+ "type": "ConstraintStrategy",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getActionMessage",
+ "args": [
+ {
+ "name": "action",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 432,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the constraint action as human readable text.\nexample\n'All steps after this one will not be visitable until '\n",
+ "description": "Get the constraint action as human readable text.\nexample\n'All steps after this one will not be visitable until '
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 18134,
+ "end": 18140,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "action"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 18128,
+ "end": 18133,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "A constraint action.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 18168,
+ "end": 18174,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "A human readable text string that describes the action\nexample\n'All steps after this one will not be visitable until '
\n"
+ }
+ ]
+ },
+ {
+ "name": "getCachedIsNodeAffectedByConstraintResult",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "constraintId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 222,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we have calculated the result for whether the node is affected by the constraint\nthe result before, we will return null.\n",
+ "description": "Check if we have calculated the result for whether the node is affected by the constraint\nthe result before, we will return null.
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 9513,
+ "end": 9519,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9507,
+ "end": 9512,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": {
+ "pos": 9544,
+ "end": 9556,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "constraintId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9538,
+ "end": 9543,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the constraint id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 9581,
+ "end": 9587,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "Return the result if we have calculated the result before. If we have not calculated\nthe result before, we will return null.
\n"
+ }
+ ]
+ },
+ {
+ "name": "getConstraintDescription",
+ "args": [
+ {
+ "name": "constraint",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 293,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable description of the constraint.\nexample\n'All steps after this one will not be visitable until the student completes\n\"3.7 Revise Your Bowls Explanation\"'\n",
+ "description": "Get the human readable description of the constraint.\nexample\n'All steps after this one will not be visitable until the student completes\n"3.7 Revise Your Bowls Explanation"'
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 12170,
+ "end": 12180,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "constraint"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 12164,
+ "end": 12169,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The constraint object.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 12210,
+ "end": 12217,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "A human readable text string that describes the constraint.\nexample\n'All steps after this one will not be visitable until the student completes\n"3.7 Revise Your Bowls Explanation"'
\n"
+ }
+ ]
+ },
+ {
+ "name": "getConstraintDescriptions",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 274,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getConstraintsThatAffectNode",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 161,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCriteriaMessage",
+ "args": [
+ {
+ "name": "criteria",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 316,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the message that describes how to satisfy the criteria\nTODO: check if the criteria is satisfied\nsatisfy the criteria\n",
+ "description": "Get the message that describes how to satisfy the criteria\nTODO: check if the criteria is satisfied\nsatisfy the criteria
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 13119,
+ "end": 13127,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "criteria"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 13113,
+ "end": 13118,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the criteria object that needs to be satisfied
\n"
+ },
+ {
+ "tagName": {
+ "pos": 13181,
+ "end": 13188,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the message to display to the student that describes how to\nsatisfy the criteria
\n"
+ }
+ ]
+ },
+ {
+ "name": "hasActiveConstraints",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 270,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isNodeAffectedByConstraint",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "constraint",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 181,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if a node is affected by the constraint\n",
+ "description": "Check if a node is affected by the constraint
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 7992,
+ "end": 7996,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "node"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 7986,
+ "end": 7991,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "check if the node is affected
\n"
+ },
+ {
+ "name": {
+ "pos": 8039,
+ "end": 8049,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "constraint"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 8033,
+ "end": 8038,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the constraint that might affect the node
\n"
+ },
+ {
+ "tagName": {
+ "pos": 8098,
+ "end": 8105,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether the node is affected by the constraint
\n"
+ }
+ ]
+ },
+ {
+ "name": "isNodeAfterConstraintAction",
+ "args": [
+ {
+ "name": "action",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 199,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "action",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isNodeTargetOfConstraint",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "targetId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 205,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "targetId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isVisibleConstraintAction",
+ "args": [
+ {
+ "name": "action",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 113,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "action",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isVisitableConstraintAction",
+ "args": [
+ {
+ "name": "action",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 122,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "action",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "orderConstraints",
+ "args": [
+ {
+ "name": "constraints",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 245,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nOrder the constraints so that they show up in the same order as in the project.\n",
+ "description": "Order the constraints so that they show up in the same order as in the project.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 10446,
+ "end": 10457,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "constraints"
+ },
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 10440,
+ "end": 10445,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "An array of constraint objects
\n"
+ },
+ {
+ "tagName": {
+ "pos": 10495,
+ "end": 10501,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "An array of ordered constraints
\n"
+ }
+ ]
+ },
+ {
+ "name": "subscribeToProjectParsed",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 81,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { ConstraintEvaluationResult } from '../common/constraint/ConstraintEvaluationResult';\nimport { EvaluateConstraintContext } from '../common/constraint/EvaluateConstraintContext';\nimport { AddXNumberOfNotesOnThisStepConstraintStrategy } from '../common/constraint/strategies/AddXNumberOfNotesOnThisStepConstraintStrategy';\nimport { BranchPathTakenConstraintStrategy } from '../common/constraint/strategies/BranchPathTakenConstraintStrategy';\nimport { ChoiceChosenConstraintStrategy } from '../common/constraint/strategies/ChoiceChosenConstraintStrategy';\nimport { ConstraintStrategy } from '../common/constraint/strategies/ConstraintStrategy';\nimport { FillXNumberOfRowsConstraintStrategy } from '../common/constraint/strategies/FillXNumberOfRowsConstraintStrategy';\nimport { HasTagConstraintStrategy } from '../common/constraint/strategies/HasTagConstraintStrategy';\nimport { IsCompletedConstraintStrategy } from '../common/constraint/strategies/IsCompletedConstraintStrategy';\nimport { IsCorrectConstraintStrategy } from '../common/constraint/strategies/IsCorrectConstraintStrategy';\nimport { IsRevisedAfterConstraintStrategy } from '../common/constraint/strategies/IsRevisedAfterConstraintStrategy';\nimport { IsVisibleConstraintStrategy } from '../common/constraint/strategies/IsVisibleConstraintStrategy';\nimport { IsVisitableConstraintStrategy } from '../common/constraint/strategies/IsVisitableContraintStrategy';\nimport { IsVisitedAfterConstraintStrategy } from '../common/constraint/strategies/IsVisitedAfterConstraintStrategy';\nimport { IsVisitedAndRevisedAfterConstraintStrategy } from '../common/constraint/strategies/IsVisitedAndRevisedAfterConstraintStrategy';\nimport { IsVisitedConstraintStrategy } from '../common/constraint/strategies/IsVisitedConstraintStrategy';\nimport { ScoreConstraintStrategy } from '../common/constraint/strategies/ScoreConstraintStrategy';\nimport { TeacherRemovalConstraintStrategy } from '../common/constraint/strategies/TeacherRemovalConstraintStrategy';\nimport { UsedXSubmitsConstraintStrategy } from '../common/constraint/strategies/UsedXSubmitsConstraintStrategy';\nimport { WroteXNumberOfWordsConstraintStrategy } from '../common/constraint/strategies/WroteXNumberOfWordsConstraintStrategy';\nimport { AnnotationService } from './annotationService';\nimport { ComponentServiceLookupService } from './componentServiceLookupService';\nimport { ConfigService } from './configService';\nimport { NotebookService } from './notebookService';\nimport { ProjectService } from './projectService';\nimport { StudentDataService } from './studentDataService';\nimport { TagService } from './tagService';\nimport { CompletionService } from './completionService';\nimport { Observable, Subject } from 'rxjs';\n\n@Injectable()\nexport class ConstraintService {\n activeConstraints: any[] = [];\n private constraintsUpdatedSource: Subject = new Subject();\n public constraintsUpdated$: Observable = this.constraintsUpdatedSource.asObservable();\n criteriaFunctionNameToStrategy = {\n addXNumberOfNotesOnThisStep: new AddXNumberOfNotesOnThisStepConstraintStrategy(),\n branchPathTaken: new BranchPathTakenConstraintStrategy(),\n choiceChosen: new ChoiceChosenConstraintStrategy(),\n fillXNumberOfRows: new FillXNumberOfRowsConstraintStrategy(),\n hasTag: new HasTagConstraintStrategy(),\n isCompleted: new IsCompletedConstraintStrategy(),\n isCorrect: new IsCorrectConstraintStrategy(),\n isRevisedAfter: new IsRevisedAfterConstraintStrategy(),\n isVisible: new IsVisibleConstraintStrategy(),\n isVisitable: new IsVisitableConstraintStrategy(),\n isVisited: new IsVisitedConstraintStrategy(),\n isVisitedAfter: new IsVisitedAfterConstraintStrategy(),\n isVisitedAndRevisedAfter: new IsVisitedAndRevisedAfterConstraintStrategy(),\n score: new ScoreConstraintStrategy(),\n teacherRemoval: new TeacherRemovalConstraintStrategy(),\n usedXSubmits: new UsedXSubmitsConstraintStrategy(),\n wroteXNumberOfWords: new WroteXNumberOfWordsConstraintStrategy()\n };\n evaluateConstraintContext: EvaluateConstraintContext;\n isNodeAffectedByConstraintResult: any = {};\n\n constructor(\n annotationService: AnnotationService,\n completionService: CompletionService,\n componentServiceLookupService: ComponentServiceLookupService,\n private configService: ConfigService,\n dataService: StudentDataService,\n notebookService: NotebookService,\n private projectService: ProjectService,\n tagService: TagService\n ) {\n this.evaluateConstraintContext = new EvaluateConstraintContext(\n annotationService,\n completionService,\n componentServiceLookupService,\n configService,\n dataService,\n notebookService,\n tagService\n );\n this.subscribeToProjectParsed();\n }\n\n private subscribeToProjectParsed(): void {\n this.projectService.projectParsed$.subscribe(() => {\n this.activeConstraints = [];\n this.isNodeAffectedByConstraintResult = {};\n for (const node of this.projectService.project.nodes) {\n const constraints = node.constraints;\n if (constraints != null) {\n if (this.configService.getConfigParam('constraints')) {\n for (const constraint of constraints) {\n this.activeConstraints.push(constraint);\n }\n }\n }\n }\n });\n }\n\n evaluate(constraints: any[] = []): ConstraintEvaluationResult {\n let isVisible = true;\n let isVisitable = true;\n for (const constraint of constraints) {\n const result = this.evaluateConstraint(constraint);\n const action = constraint.action;\n if (this.isVisibleConstraintAction(action)) {\n isVisible = isVisible && result;\n } else if (this.isVisitableConstraintAction(action)) {\n isVisitable = isVisitable && result;\n }\n }\n return { isVisible: isVisible, isVisitable: isVisitable };\n }\n\n private isVisibleConstraintAction(action: string): boolean {\n return [\n 'makeThisComponentNotVisible',\n 'makeThisNodeNotVisible',\n 'makeAllNodesAfterThisNotVisible',\n 'makeAllOtherNodesNotVisible'\n ].includes(action);\n }\n\n private isVisitableConstraintAction(action: string): boolean {\n return [\n 'makeThisNodeNotVisitable',\n 'makeAllNodesAfterThisNotVisitable',\n 'makeAllOtherNodesNotVisitable'\n ].includes(action);\n }\n\n evaluateConstraint(constraint: any): boolean {\n const removalCriteria = constraint.removalCriteria;\n return (\n removalCriteria == null ||\n this.evaluateMultipleRemovalCriteria(removalCriteria, constraint.removalConditional)\n );\n }\n\n private evaluateMultipleRemovalCriteria(\n multipleRemovalCriteria: any[],\n removalConditional: any\n ): boolean {\n return removalConditional === 'any'\n ? multipleRemovalCriteria.some((criteria) => this.evaluateCriteria(criteria))\n : multipleRemovalCriteria.every((criteria) => this.evaluateCriteria(criteria));\n }\n\n evaluateCriteria(criteria: any): boolean {\n const strategy = this.criteriaFunctionNameToStrategy[criteria.name];\n return strategy == null || this.evaluateStrategy(criteria, strategy);\n }\n\n private evaluateStrategy(criteria: any, strategy: ConstraintStrategy): boolean {\n this.evaluateConstraintContext.setStrategy(strategy);\n return this.evaluateConstraintContext.evaluate(criteria);\n }\n\n evaluateCriterias(criterias: any[]): boolean {\n return criterias.every((criteria) => this.evaluateCriteria(criteria));\n }\n\n getConstraintsThatAffectNode(node: any): any[] {\n if (!this.configService.getConfigParam('constraints')) {\n return [];\n }\n const constraints = [];\n const allConstraints = this.activeConstraints;\n for (const constraint of allConstraints) {\n if (this.isNodeAffectedByConstraint(node, constraint)) {\n constraints.push(constraint);\n }\n }\n return constraints;\n }\n\n /**\n * Check if a node is affected by the constraint\n * @param node check if the node is affected\n * @param constraint the constraint that might affect the node\n * @returns whether the node is affected by the constraint\n */\n private isNodeAffectedByConstraint(node: any, constraint: any): boolean {\n const cachedResult = this.getCachedIsNodeAffectedByConstraintResult(node.id, constraint.id);\n if (cachedResult != null) {\n return cachedResult;\n } else {\n let result = false;\n if (this.isNodeAfterConstraintAction(constraint.action)) {\n if (this.projectService.isNodeIdAfter(constraint.targetId, node.id)) {\n result = true;\n }\n } else {\n result = this.isNodeTargetOfConstraint(node, constraint.targetId);\n }\n this.cacheIsNodeAffectedByConstraintResult(node.id, constraint.id, result);\n return result;\n }\n }\n\n private isNodeAfterConstraintAction(action: string): boolean {\n return (\n action === 'makeAllNodesAfterThisNotVisible' || action === 'makeAllNodesAfterThisNotVisitable'\n );\n }\n\n private isNodeTargetOfConstraint(node: any, targetId: string) {\n const targetNode = this.projectService.getNodeById(targetId);\n return (\n targetNode != null &&\n ((targetNode.type === 'node' && node.id === targetId) ||\n (targetNode.type === 'group' &&\n (node.id === targetId || this.projectService.isNodeDescendentOfGroup(node, targetNode))))\n );\n }\n\n /**\n * Check if we have calculated the result for whether the node is affected by the constraint\n * @param nodeId the node id\n * @param constraintId the constraint id\n * @return Return the result if we have calculated the result before. If we have not calculated\n * the result before, we will return null.\n */\n private getCachedIsNodeAffectedByConstraintResult(nodeId: string, constraintId: string): boolean {\n return this.isNodeAffectedByConstraintResult[nodeId + '-' + constraintId];\n }\n\n /**\n * Remember the result for whether the node is affected by the constraint\n * @param nodeId the node id\n * @param constraintId the constraint id\n * @param whether the node is affected by the constraint\n */\n private cacheIsNodeAffectedByConstraintResult(\n nodeId: string,\n constraintId: string,\n result: boolean\n ): void {\n this.isNodeAffectedByConstraintResult[nodeId + '-' + constraintId] = result;\n }\n\n /**\n * Order the constraints so that they show up in the same order as in the project.\n * @param constraints An array of constraint objects\n * @return An array of ordered constraints\n */\n orderConstraints(constraints: any[]): any[] {\n const orderedNodeIds = this.projectService.getFlattenedProjectAsNodeIds();\n return constraints.sort(this.constraintsComparatorGenerator(orderedNodeIds));\n }\n\n /**\n * Create the constraints comparator function that is used for sorting an array of constraint\n * objects.\n * @param orderedNodeIds An array of node ids in the order in which they show up in the project.\n * @return A comparator that orders constraint objects in the order in which the target ids show\n * up in the project.\n */\n private constraintsComparatorGenerator(orderedNodeIds: string[]): any {\n return function (constraintA: any, constraintB: any) {\n const constraintAIndex = orderedNodeIds.indexOf(constraintA.targetId);\n const constraintBIndex = orderedNodeIds.indexOf(constraintB.targetId);\n return constraintAIndex - constraintBIndex;\n };\n }\n\n clearActiveConstraints(): void {\n this.activeConstraints = [];\n this.constraintsUpdatedSource.next();\n }\n\n hasActiveConstraints(): boolean {\n return this.activeConstraints.length > 0;\n }\n\n getConstraintDescriptions(nodeId: string): string {\n let constraintDescriptions = '';\n const constraints = this.projectService.getNode(nodeId).getConstraints();\n for (let c = 0; c < constraints.length; c++) {\n const constraint = constraints[c];\n const description = this.getConstraintDescription(constraint);\n constraintDescriptions += c + 1 + ' - ' + description + '\\n';\n }\n return constraintDescriptions;\n }\n\n /**\n * Get the human readable description of the constraint.\n * @param constraint The constraint object.\n * @returns A human readable text string that describes the constraint.\n * example\n * 'All steps after this one will not be visitable until the student completes\n * \"3.7 Revise Your Bowls Explanation\"'\n */\n private getConstraintDescription(constraint: any): string {\n let message = '';\n for (const singleRemovalCriteria of constraint.removalCriteria) {\n if (message != '') {\n // this constraint has multiple removal criteria\n if (constraint.removalConditional === 'any') {\n message += ' or ';\n } else if (constraint.removalConditional === 'all') {\n message += ' and ';\n }\n }\n message += this.getCriteriaMessage(singleRemovalCriteria);\n }\n return this.getActionMessage(constraint.action) + message;\n }\n\n /**\n * Get the message that describes how to satisfy the criteria\n * TODO: check if the criteria is satisfied\n * @param criteria the criteria object that needs to be satisfied\n * @returns the message to display to the student that describes how to\n * satisfy the criteria\n */\n getCriteriaMessage(criteria: any): string {\n let message = '';\n const name = criteria.name;\n const params = criteria.params;\n\n if (name === 'isCompleted') {\n const nodeId = params.nodeId;\n if (nodeId != null) {\n const nodeTitle = this.projectService.getNodePositionAndTitle(nodeId);\n message += $localize`Complete ${nodeTitle} `;\n }\n } else if (name === 'isVisited') {\n const nodeId = params.nodeId;\n if (nodeId != null) {\n const nodeTitle = this.projectService.getNodePositionAndTitle(nodeId);\n message += $localize`Visit ${nodeTitle} `;\n }\n } else if (name === 'isCorrect') {\n const nodeId = params.nodeId;\n if (nodeId != null) {\n const nodeTitle = this.projectService.getNodePositionAndTitle(nodeId);\n message += $localize`Correctly answer ${nodeTitle} `;\n }\n } else if (name === 'score') {\n const nodeId = params.nodeId;\n let nodeTitle = '';\n let scoresString = '';\n\n if (nodeId != null) {\n nodeTitle = this.projectService.getNodePositionAndTitle(nodeId);\n }\n\n const scores = params.scores;\n if (scores != null) {\n scoresString = scores.join(', ');\n }\n message += $localize`Obtain a score of ${scoresString} on ${nodeTitle} `;\n } else if (name === 'choiceChosen') {\n const nodeId = params.nodeId;\n const componentId = params.componentId;\n const choiceIds = params.choiceIds;\n let nodeTitle = this.projectService.getNodePositionAndTitle(nodeId);\n let choices = this.projectService.getChoiceText(nodeId, componentId, choiceIds);\n let choiceText = choices.join(', ');\n message += $localize`You must choose \"${choiceText}\" on \"${nodeTitle}\"`;\n } else if (name === 'usedXSubmits') {\n const nodeId = params.nodeId;\n let nodeTitle = '';\n\n const requiredSubmitCount = params.requiredSubmitCount;\n\n if (nodeId != null) {\n nodeTitle = this.projectService.getNodePositionAndTitle(nodeId);\n }\n\n if (requiredSubmitCount == 1) {\n message += $localize`Submit ${requiredSubmitCount} time on ${nodeTitle} `;\n } else {\n message += $localize`Submit ${requiredSubmitCount} times on ${nodeTitle} `;\n }\n } else if (name === 'branchPathTaken') {\n const fromNodeId = params.fromNodeId;\n const fromNodeTitle = this.projectService.getNodePositionAndTitle(fromNodeId);\n const toNodeId = params.toNodeId;\n const toNodeTitle = this.projectService.getNodePositionAndTitle(toNodeId);\n message += $localize`Take the branch path from ${fromNodeTitle} to ${toNodeTitle} `;\n } else if (name === 'wroteXNumberOfWords') {\n const nodeId = params.nodeId;\n if (nodeId != null) {\n const requiredNumberOfWords = params.requiredNumberOfWords;\n const nodeTitle = this.projectService.getNodePositionAndTitle(nodeId);\n message += $localize`Write ${requiredNumberOfWords} words on ${nodeTitle} `;\n }\n } else if (name === 'isVisible') {\n const nodeId = params.nodeId;\n if (nodeId != null) {\n const nodeTitle = this.projectService.getNodePositionAndTitle(nodeId);\n message += $localize`\"${nodeTitle}\" is visible`;\n }\n } else if (name === 'isVisitable') {\n const nodeId = params.nodeId;\n if (nodeId != null) {\n const nodeTitle = this.projectService.getNodePositionAndTitle(nodeId);\n message += $localize`\"${nodeTitle}\" is visitable`;\n }\n } else if (name === 'addXNumberOfNotesOnThisStep') {\n const nodeId = params.nodeId;\n const requiredNumberOfNotes = params.requiredNumberOfNotes;\n const nodeTitle = this.projectService.getNodePositionAndTitle(nodeId);\n if (requiredNumberOfNotes == 1) {\n message += $localize`Add ${requiredNumberOfNotes} note on ${nodeTitle} `;\n } else {\n message += $localize`Add ${requiredNumberOfNotes} notes on ${nodeTitle} `;\n }\n } else if (name === 'fillXNumberOfRows') {\n const requiredNumberOfFilledRows = params.requiredNumberOfFilledRows;\n const nodeId = params.nodeId;\n const nodeTitle = this.projectService.getNodePositionAndTitle(nodeId);\n if (requiredNumberOfFilledRows == 1) {\n message += $localize`You must fill in ${requiredNumberOfFilledRows} row in the Table on ${nodeTitle} `;\n } else {\n message += $localize`You must fill in ${requiredNumberOfFilledRows} rows in the Table on ${nodeTitle} `;\n }\n } else if (name === 'teacherRemoval') {\n message += $localize`Wait for your teacher to unlock the item`;\n }\n return message;\n }\n\n /**\n * Get the constraint action as human readable text.\n * @param action A constraint action.\n * @return A human readable text string that describes the action\n * example\n * 'All steps after this one will not be visitable until '\n */\n private getActionMessage(action: string): string {\n if (action === 'makeAllNodesAfterThisNotVisitable') {\n return $localize`All steps after this one will not be visitable until `;\n }\n if (action === 'makeAllNodesAfterThisNotVisible') {\n return $localize`All steps after this one will not be visible until `;\n }\n if (action === 'makeAllOtherNodesNotVisitable') {\n return $localize`All other steps will not be visitable until `;\n }\n if (action === 'makeAllOtherNodesNotVisible') {\n return $localize`All other steps will not be visible until `;\n }\n if (action === 'makeThisNodeNotVisitable') {\n return $localize`This step will not be visitable until `;\n }\n if (action === 'makeThisNodeNotVisible') {\n return $localize`This step will not be visible until `;\n }\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "annotationService",
+ "type": "AnnotationService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "completionService",
+ "type": "CompletionService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentServiceLookupService",
+ "type": "ComponentServiceLookupService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "dataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "notebookService",
+ "type": "NotebookService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "tagService",
+ "type": "TagService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 57,
+ "jsdoctags": [
+ {
+ "name": "annotationService",
+ "type": "AnnotationService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "completionService",
+ "type": "CompletionService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentServiceLookupService",
+ "type": "ComponentServiceLookupService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "dataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "notebookService",
+ "type": "NotebookService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "tagService",
+ "type": "TagService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "CopyNodesService",
+ "id": "injectable-CopyNodesService-3f0596d477461eb0b06ca659d3bc4fd88cf6a273dfc3bed1980662165edb64a5c83d54315b55d841c2b8724f67b4aa59a747b870668e7499d2b447d16247256c",
+ "file": "src/assets/wise5/services/copyNodesService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "copyNode",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 55,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCopy the node with the specified nodeId\n",
+ "description": "Copy the node with the specified nodeId
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 1748,
+ "end": 1754,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1742,
+ "end": 1747,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id to copy
\n"
+ },
+ {
+ "tagName": {
+ "pos": 1781,
+ "end": 1787,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "copied node
\n"
+ }
+ ]
+ },
+ {
+ "name": "copyNodeInside",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "groupId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 20,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCopy node and put it inside a specified group as first step\n",
+ "description": "Copy node and put it inside a specified group as first step
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 538,
+ "end": 544,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 532,
+ "end": 537,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id to copy
\n"
+ },
+ {
+ "name": {
+ "pos": 577,
+ "end": 584,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "groupId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 571,
+ "end": 576,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the group to insert the copied node as first step
\n"
+ }
+ ]
+ },
+ {
+ "name": "copyNodes",
+ "args": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "fromProjectId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "toProjectId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 83,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet a copy of nodes from the fromProject. This will copy the asset files\nand change file names if necessary. If an asset file with the same\nname exists in both projects we will check if their content is the\nsame. If the content is the same we don't need to copy the file. If\nthe content is different, we need to make a copy of the file with a\nnew name and change all the references in the steps to use the new\nname.\n",
+ "description": "Get a copy of nodes from the fromProject. This will copy the asset files\nand change file names if necessary. If an asset file with the same\nname exists in both projects we will check if their content is the\nsame. If the content is the same we don't need to copy the file. If\nthe content is different, we need to make a copy of the file with a\nnew name and change all the references in the steps to use the new\nname.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2776,
+ "end": 2781,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodes"
+ },
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2770,
+ "end": 2775,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the nodes to import
\n"
+ },
+ {
+ "name": {
+ "pos": 2814,
+ "end": 2827,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "fromProjectId"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2808,
+ "end": 2813,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "copy the nodes from this project
\n"
+ },
+ {
+ "name": {
+ "pos": 2873,
+ "end": 2884,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "toProjectId"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2867,
+ "end": 2872,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "copy the nodes into this project
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2924,
+ "end": 2931,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "an observable with an array of copied nodes
\n"
+ }
+ ]
+ },
+ {
+ "name": "copyNodesAfter",
+ "args": [
+ {
+ "name": "nodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCopy nodes and put them after a certain node id\n",
+ "description": "Copy nodes and put them after a certain node id
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 937,
+ "end": 944,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeIds"
+ },
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 931,
+ "end": 936,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node ids to copy
\n"
+ },
+ {
+ "name": {
+ "pos": 978,
+ "end": 989,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeIdAfter"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 972,
+ "end": 977,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id we will put the copied nodes after
\n"
+ }
+ ]
+ },
+ {
+ "name": "copyNodesInsideGroup",
+ "args": [
+ {
+ "name": "nodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "groupNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 44,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "groupNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { ConfigService } from './configService';\nimport { TeacherProjectService } from './teacherProjectService';\nimport { copy } from '../common/object/object';\n\n@Injectable()\nexport class CopyNodesService {\n constructor(\n protected http: HttpClient,\n protected configService: ConfigService,\n protected projectService: TeacherProjectService\n ) {}\n\n /**\n * Copy node and put it inside a specified group as first step\n * @param nodeId the node id to copy\n * @param groupId the group to insert the copied node as first step\n */\n copyNodeInside(nodeId: string, groupId: string): any {\n const newNode = this.copyNode(nodeId);\n this.projectService.createNodeInside(newNode, groupId);\n this.projectService.parseProject();\n return newNode;\n }\n\n /**\n * Copy nodes and put them after a certain node id\n * @param nodeIds the node ids to copy\n * @param nodeIdAfter the node id we will put the copied nodes after\n */\n copyNodesAfter(nodeIds: string[], nodeIdAfter: string): any[] {\n const newNodes = [];\n for (const nodeId of nodeIds) {\n const newNode = this.copyNode(nodeId);\n this.projectService.createNodeAfter(newNode, nodeIdAfter);\n nodeIdAfter = newNode.id;\n this.projectService.parseProject();\n newNodes.push(newNode);\n }\n return newNodes;\n }\n\n copyNodesInsideGroup(nodeIds: string[], groupNodeId: string): any[] {\n const firstNode: any = this.copyNodeInside(nodeIds[0], groupNodeId);\n const otherNodes = this.copyNodesAfter(nodeIds.slice(1), firstNode.id);\n return [firstNode].concat(otherNodes);\n }\n\n /**\n * Copy the node with the specified nodeId\n * @param nodeId the node id to copy\n * @return copied node\n */\n private copyNode(nodeId: string): any {\n const node = copy(this.projectService.getNodeById(nodeId));\n node.id = this.projectService.getNextAvailableNodeId();\n node.transitionLogic = {};\n node.constraints = [];\n\n const newComponentIds = [];\n for (const component of node.components) {\n const newComponentId = this.projectService.getUnusedComponentId(newComponentIds);\n newComponentIds.push(newComponentId);\n component.id = newComponentId;\n }\n return node;\n }\n\n /**\n * Get a copy of nodes from the fromProject. This will copy the asset files\n * and change file names if necessary. If an asset file with the same\n * name exists in both projects we will check if their content is the\n * same. If the content is the same we don't need to copy the file. If\n * the content is different, we need to make a copy of the file with a\n * new name and change all the references in the steps to use the new\n * name.\n * @param nodes the nodes to import\n * @param fromProjectId copy the nodes from this project\n * @param toProjectId copy the nodes into this project\n * @returns an observable with an array of copied nodes\n */\n copyNodes(nodes: any[], fromProjectId: number, toProjectId: number) {\n return this.http.post(this.configService.getConfigParam('importStepsURL'), {\n steps: JSON.stringify(nodes),\n fromProjectId: fromProjectId,\n toProjectId: toProjectId\n });\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 8,
+ "jsdoctags": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "CopyProjectService",
+ "id": "injectable-CopyProjectService-d5b7019157c9f66838ce134aff30c8b3f3a139b06d0f9f5a4c4044b225866fea1688cbd69f53cad794f6f659f1e3831e1f44c8cd059573048f1dbb71c41efb57",
+ "file": "src/assets/wise5/services/copyProjectService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "copyProject",
+ "args": [
+ {
+ "name": "projectId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 10,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "projectId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { ConfigService } from './configService';\n\n@Injectable()\nexport class CopyProjectService {\n constructor(protected http: HttpClient, protected ConfigService: ConfigService) {}\n\n copyProject(projectId: number): Observable {\n return this.http.post(\n `${this.ConfigService.getConfigParam('copyProjectURL')}/${projectId}`,\n null\n );\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 7,
+ "jsdoctags": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "CopyTranslationsService",
+ "id": "injectable-CopyTranslationsService-2b1ff7660544b5c35ab95a60cc1338d30e1087dc17a2a7584dc225336be2d86190836b10ea18140f28620d71b3c82f474b3cfa09285a55cfa3369c686af9e4f6",
+ "file": "src/assets/wise5/services/copyTranslationsService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "copyComponents",
+ "args": [
+ {
+ "name": "node",
+ "type": "Node",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 49,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123,
+ 134
+ ],
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "Node",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "copyNodes",
+ "args": [
+ {
+ "name": "nodes",
+ "type": "Node[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 21,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123,
+ 134
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodes",
+ "type": "Node[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getI18NKey",
+ "args": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "key",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "I18NReplaceKey",
+ "typeParameters": [],
+ "line": 57,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "key",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "EditTranslationsService"
+ }
+ },
+ {
+ "name": "getSaveTranslationRequests",
+ "args": [
+ {
+ "name": "i18nKeys",
+ "type": "I18NReplaceKey[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 29,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123,
+ 134
+ ],
+ "jsdoctags": [
+ {
+ "name": "i18nKeys",
+ "type": "I18NReplaceKey[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "tryCopyComponents",
+ "args": [
+ {
+ "name": "node",
+ "type": "Node",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "components",
+ "type": "ComponentContent[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 40,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "Node",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "components",
+ "type": "ComponentContent[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "tryCopyNodes",
+ "args": [
+ {
+ "name": "nodes",
+ "type": "Node[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 15,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodes",
+ "type": "Node[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "fetchAllTranslations",
+ "args": [],
+ "optional": false,
+ "returnType": "Promise>",
+ "typeParameters": [],
+ "line": 20,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124,
+ 134
+ ],
+ "inheritance": {
+ "file": "EditTranslationsService"
+ }
+ },
+ {
+ "name": "getI18NKeys",
+ "args": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 36,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "EditTranslationsService"
+ }
+ },
+ {
+ "name": "getSaveTranslationRequest",
+ "args": [
+ {
+ "name": "translations",
+ "type": "Translations",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "language",
+ "type": "Language",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 54,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "translations",
+ "type": "Translations",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "language",
+ "type": "Language",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "EditTranslationsService"
+ }
+ },
+ {
+ "name": "fetchTranslations",
+ "args": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 16,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ProjectTranslationService"
+ }
+ },
+ {
+ "name": "getTranslationMappingURL",
+ "args": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 24,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ProjectTranslationService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { EditTranslationsService } from './editProjectTranslationsService';\nimport { Node } from '../common/Node';\nimport { Observable, forkJoin } from 'rxjs';\nimport { generateRandomKey } from '../common/string/string';\nimport { ComponentContent } from '../common/ComponentContent';\n\ninterface I18NReplaceKey {\n new: string;\n original: string;\n}\n\n@Injectable()\nexport class CopyTranslationsService extends EditTranslationsService {\n tryCopyNodes(nodes: Node[]): void {\n if (this.projectService.getLocale().hasTranslations()) {\n this.copyNodes(nodes);\n }\n }\n\n private async copyNodes(nodes: Node[]): Promise {\n const i18nKeys = nodes.flatMap((node) =>\n node.components.flatMap((component) => this.getI18NKeys(component))\n );\n forkJoin(await this.getSaveTranslationRequests(i18nKeys)).subscribe();\n this.projectService.saveProject();\n }\n\n private async getSaveTranslationRequests(\n i18nKeys: I18NReplaceKey[]\n ): Promise[]> {\n const saveTranslationRequests: Observable[] = [];\n (await this.fetchAllTranslations()).forEach((translations, language) => {\n i18nKeys.forEach((i18nKey) => (translations[i18nKey.new] = translations[i18nKey.original]));\n saveTranslationRequests.push(this.getSaveTranslationRequest(translations, language));\n });\n return saveTranslationRequests;\n }\n\n tryCopyComponents(node: Node, components: ComponentContent[]): void {\n if (this.projectService.getLocale().hasTranslations()) {\n this.copyComponents(\n node,\n components.map((c) => c.id)\n );\n }\n }\n\n private async copyComponents(node: Node, componentIds: string[]): Promise {\n const i18nKeys = node.components\n .filter((component) => componentIds.includes(component.id))\n .flatMap((component) => this.getI18NKeys(component));\n forkJoin(await this.getSaveTranslationRequests(i18nKeys)).subscribe();\n this.projectService.saveProject();\n }\n\n protected getI18NKey(componentElement: object, key: string): I18NReplaceKey {\n const originalI18NKey = componentElement[key].id;\n const newI18NKey = generateRandomKey(30);\n componentElement[key].id = newI18NKey;\n return { original: originalI18NKey, new: newI18NKey };\n }\n}\n",
+ "extends": [
+ "EditTranslationsService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "CRaterPingService",
+ "id": "injectable-CRaterPingService-100a1be381b01de70ef037e648f7b77cafc285043836f873d3440df8b51c6e4240293b2f07daecbfe7f22d08e1867913f6381f4582ce768483990e579092a06c",
+ "file": "src/assets/wise5/services/cRaterPingService.ts",
+ "properties": [
+ {
+ "name": "intervals",
+ "defaultValue": "new Map()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Map",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "pingUrl",
+ "defaultValue": "'/api/c-rater/ping'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "forBerkeley",
+ "args": [
+ {
+ "name": "itemId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "itemId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "intervalsIncludesItem",
+ "args": [
+ {
+ "name": "itemId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 22,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "itemId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "sendPing",
+ "args": [
+ {
+ "name": "itemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "itemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "startPinging",
+ "args": [
+ {
+ "name": "itemId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 11,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "itemId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "stopPinging",
+ "args": [
+ {
+ "name": "itemId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 34,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "itemId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class CRaterPingService {\n private pingUrl = '/api/c-rater/ping';\n private intervals: Map = new Map();\n\n constructor(private http: HttpClient) {}\n\n startPinging(itemId: string): void {\n if (!this.intervalsIncludesItem(itemId) && this.forBerkeley(itemId)) {\n this.sendPing(itemId);\n // 295000 ms = 4min 55sec\n this.intervals.set(\n itemId,\n setInterval(() => this.sendPing(itemId), 295000)\n );\n }\n }\n\n private intervalsIncludesItem(itemId: string) {\n return [...this.intervals.keys()].includes(itemId);\n }\n\n private forBerkeley(itemId: string): boolean {\n return itemId.slice(0, 9) === 'berkeley_';\n }\n\n private sendPing(itemId): void {\n this.http.post(this.pingUrl, { itemId: itemId }).subscribe();\n }\n\n stopPinging(itemId: string): void {\n if (this.intervalsIncludesItem(itemId)) {\n clearInterval(this.intervals.get(itemId));\n this.intervals.delete(itemId);\n }\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 7,
+ "jsdoctags": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "CRaterService",
+ "id": "injectable-CRaterService-7e2b0e091ad58e9467829f9f34a1e42aa2631693fe2b5b08df56fe4ae5ad6bfd310b91b801e4c17d42002bf9e3e6b748d817a7c40ff7a39edb88987a5edd4adf",
+ "file": "src/assets/wise5/services/cRaterService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "getCRaterFeedbackTextByScore",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "score",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 130,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the feedback text for the given score\n",
+ "description": "Get the feedback text for the given score
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 4340,
+ "end": 4349,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4334,
+ "end": 4339,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 4384,
+ "end": 4389,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "score"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4378,
+ "end": 4383,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the score we want feedback for
\n"
+ },
+ {
+ "tagName": {
+ "pos": 4427,
+ "end": 4434,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the feedback text for the given score
\n"
+ }
+ ]
+ },
+ {
+ "name": "getCRaterItemId",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 61,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCRaterItemType",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 57,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCRaterResponse",
+ "args": [
+ {
+ "name": "responses",
+ "type": "RawCRaterResponse",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "submitCounter",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "CRaterResponse",
+ "typeParameters": [],
+ "line": 217,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "responses",
+ "type": "RawCRaterResponse",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "submitCounter",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCRaterRubric",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "optional": true
+ }
+ ],
+ "optional": false,
+ "returnType": "CRaterRubric",
+ "typeParameters": [],
+ "line": 263,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "optional": true,
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCRaterScoreOn",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 70,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nFind when we should perform the CRater scoring\n",
+ "description": "Find when we should perform the CRater scoring
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2344,
+ "end": 2353,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2338,
+ "end": 2343,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2382,
+ "end": 2389,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "when to perform the CRater scoring e.g. 'submit', 'save', 'change', 'exit'
\n"
+ }
+ ]
+ },
+ {
+ "name": "getCRaterScoringRuleByScore",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "score",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 107,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the CRater scoring rule by score\n",
+ "description": "Get the CRater scoring rule by score
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3687,
+ "end": 3696,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3681,
+ "end": 3686,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 3731,
+ "end": 3736,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "score"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3725,
+ "end": 3730,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the score
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3753,
+ "end": 3760,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the scoring rule for the given score
\n"
+ }
+ ]
+ },
+ {
+ "name": "getIdeas",
+ "args": [
+ {
+ "name": "responses",
+ "type": "RawCRaterResponse",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "CRaterIdea[]",
+ "typeParameters": [],
+ "line": 254,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "responses",
+ "type": "RawCRaterResponse",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getMultipleAttemptCRaterFeedbackTextByScore",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "previousScore",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "currentScore",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 142,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the feedback text for the given previous score and current score\n",
+ "description": "Get the feedback text for the given previous score and current score
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 4784,
+ "end": 4793,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4778,
+ "end": 4783,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 4828,
+ "end": 4841,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "previousScore"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4822,
+ "end": 4827,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the score from the last submit
\n"
+ },
+ {
+ "name": {
+ "pos": 4885,
+ "end": 4897,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "currentScore"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4879,
+ "end": 4884,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the score from the current submit
\n"
+ },
+ {
+ "tagName": {
+ "pos": 4938,
+ "end": 4945,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the feedback text for the given previous score and current score
\n"
+ }
+ ]
+ },
+ {
+ "name": "getMultipleAttemptCRaterScoringRuleByScore",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "previousScore",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "currentScore",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 166,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the multiple attempt CRater scoring rule by previous score and\ncurrent score\n",
+ "description": "Get the multiple attempt CRater scoring rule by previous score and\ncurrent score
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 5488,
+ "end": 5497,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5482,
+ "end": 5487,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 5532,
+ "end": 5545,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "previousScore"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5526,
+ "end": 5531,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the score from the last submit
\n"
+ },
+ {
+ "name": {
+ "pos": 5589,
+ "end": 5601,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "currentScore"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5583,
+ "end": 5588,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the score from the current submit
\n"
+ },
+ {
+ "tagName": {
+ "pos": 5642,
+ "end": 5649,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the scoring rule for the given previous score and current score
\n"
+ }
+ ]
+ },
+ {
+ "name": "getScore",
+ "args": [
+ {
+ "name": "responses",
+ "type": "RawCRaterResponse",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 233,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "responses",
+ "type": "RawCRaterResponse",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getScores",
+ "args": [
+ {
+ "name": "responses",
+ "type": "RawCRaterResponse",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "CRaterScore[]",
+ "typeParameters": [],
+ "line": 237,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "responses",
+ "type": "RawCRaterResponse",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCRaterEnabled",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 84,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCRaterScoreOnEvent",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "event",
+ "type": "\"save\" | \"submit\" | \"change\"",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 96,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the CRater is set to score on an event\n",
+ "description": "Check if the CRater is set to score on an event
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3254,
+ "end": 3263,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3248,
+ "end": 3253,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 3298,
+ "end": 3303,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "event"
+ },
+ "type": "\"save\" | \"submit\" | \"change\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3292,
+ "end": 3297,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "trigger event, 'save', 'submit', or 'change'
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3355,
+ "end": 3362,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether the CRater is set to score when the event is triggered
\n"
+ }
+ ]
+ },
+ {
+ "name": "isSingleScore",
+ "args": [
+ {
+ "name": "responses",
+ "type": "RawCRaterResponse",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 229,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "responses",
+ "type": "RawCRaterResponse",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "makeCRaterScoringRequest",
+ "args": [
+ {
+ "name": "itemId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "responseId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "responseText",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nMake a CRater request to score student response\n",
+ "description": "Make a CRater request to score student response
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 977,
+ "end": 983,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "itemId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 971,
+ "end": 976,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "CRater item ID
\n"
+ },
+ {
+ "name": {
+ "pos": 1011,
+ "end": 1021,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "responseId"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1005,
+ "end": 1010,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "number used to keep track of this request
\n"
+ },
+ {
+ "name": {
+ "pos": 1076,
+ "end": 1088,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "responseText"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1070,
+ "end": 1075,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the student's response to CRater item
\n"
+ },
+ {
+ "tagName": {
+ "pos": 1133,
+ "end": 1140,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "a promise that returns the result of the CRater request
\n"
+ }
+ ]
+ },
+ {
+ "name": "makeCRaterVerifyRequest",
+ "args": [
+ {
+ "name": "itemId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 211,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the item id is a valid CRater item id.\n",
+ "description": "Check if the item id is a valid CRater item id.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 7253,
+ "end": 7259,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "itemId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 7247,
+ "end": 7252,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "A string.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 7276,
+ "end": 7282,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "A promise that returns whether the item id is valid.
\n"
+ }
+ ]
+ },
+ {
+ "name": "mockResponse",
+ "args": [
+ {
+ "name": "responseText",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 46,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "responseText",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "'use strict';\n\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpParams } from '@angular/common/http';\nimport { ConfigService } from './configService';\nimport { Observable, of } from 'rxjs';\nimport { CRaterIdea } from '../components/common/cRater/CRaterIdea';\nimport { CRaterScore } from '../components/common/cRater/CRaterScore';\nimport { CRaterResponse } from '../components/common/cRater/CRaterResponse';\nimport { RawCRaterResponse } from '../components/common/cRater/RawCRaterResponse';\nimport { CRaterRubric } from '../components/common/cRater/CRaterRubric';\nimport { ProjectService } from './projectService';\nimport { OpenResponseContent } from '../components/openResponse/OpenResponseContent';\n\n@Injectable()\nexport class CRaterService {\n constructor(\n protected http: HttpClient,\n protected configService: ConfigService,\n private projectService: ProjectService\n ) {}\n\n /**\n * Make a CRater request to score student response\n * @param itemId CRater item ID\n * @param responseId number used to keep track of this request\n * @param responseText the student's response to CRater item\n * @returns a promise that returns the result of the CRater request\n */\n makeCRaterScoringRequest(\n itemId: string,\n responseId: number,\n responseText: string\n ): Observable {\n if (itemId === 'MOCK') {\n return this.mockResponse(responseText);\n } else {\n return this.http.post(`${this.configService.getCRaterRequestURL()}/score`, {\n itemId: itemId,\n responseId: responseId,\n responseText: responseText\n });\n }\n }\n\n private mockResponse(responseText: string): Observable {\n const ideasFound = responseText.match(/idea([a-zA-Z0-9]+)/g) ?? [];\n const isNonScorable = responseText.includes('isNonScorable') ? 1 : 0;\n return of({\n scores: [{ id: 'nonscorable', score: isNonScorable }],\n ideas: ideasFound.map((idea) => {\n return { name: idea, detected: true, characterOffsets: [] };\n })\n });\n }\n\n private getCRaterItemType(component: any): string {\n return component.cRater != null ? component.cRater.itemType : null;\n }\n\n getCRaterItemId(component: any): string {\n return component.cRater != null ? component.cRater.itemId : null;\n }\n\n /**\n * Find when we should perform the CRater scoring\n * @param component the component content\n * @returns when to perform the CRater scoring e.g. 'submit', 'save', 'change', 'exit'\n */\n private getCRaterScoreOn(component: any): string {\n /*\n * CRater can be enabled in two ways\n * 1. the enableCRater field is true\n * 2. there is no enableCRater field but there is a cRater object (this is for legacy purposes)\n */\n if (\n (component.enableCRater && component.cRater != null) ||\n (!component.hasOwnProperty('enableCRater') && component.cRater != null)\n ) {\n return component.cRater.scoreOn;\n }\n }\n\n isCRaterEnabled(component: any): boolean {\n const cRaterItemType = this.getCRaterItemType(component);\n const cRaterItemId = this.getCRaterItemId(component);\n return component.enableCRater && cRaterItemType != null && cRaterItemId != null;\n }\n\n /**\n * Check if the CRater is set to score on an event\n * @param component the component content\n * @param event trigger event, 'save', 'submit', or 'change'\n * @returns whether the CRater is set to score when the event is triggered\n */\n isCRaterScoreOnEvent(component: any, event: 'save' | 'submit' | 'change'): boolean {\n const scoreOn = this.getCRaterScoreOn(component);\n return scoreOn != null && scoreOn === event;\n }\n\n /**\n * Get the CRater scoring rule by score\n * @param component the component content\n * @param score the score\n * @returns the scoring rule for the given score\n */\n private getCRaterScoringRuleByScore(component: any, score: any): any {\n const cRater = component.cRater;\n if (cRater != null) {\n const scoringRules = cRater.scoringRules;\n if (scoringRules != null) {\n for (let tempScoringRule of scoringRules) {\n if (tempScoringRule != null) {\n if (tempScoringRule.score == score) {\n return tempScoringRule;\n }\n }\n }\n }\n }\n return null;\n }\n\n /**\n * Get the feedback text for the given score\n * @param component the component content\n * @param score the score we want feedback for\n * @returns the feedback text for the given score\n */\n getCRaterFeedbackTextByScore(component: any, score: any): any {\n const scoringRule = this.getCRaterScoringRuleByScore(component, score);\n return scoringRule != null ? scoringRule.feedbackText : null;\n }\n\n /**\n * Get the feedback text for the given previous score and current score\n * @param component the component content\n * @param previousScore the score from the last submit\n * @param currentScore the score from the current submit\n * @returns the feedback text for the given previous score and current score\n */\n getMultipleAttemptCRaterFeedbackTextByScore(\n component: any,\n previousScore: any,\n currentScore: any\n ): string {\n const scoringRule = this.getMultipleAttemptCRaterScoringRuleByScore(\n component,\n previousScore,\n currentScore\n );\n if (scoringRule != null) {\n return scoringRule.feedbackText;\n }\n return null;\n }\n\n /**\n * Get the multiple attempt CRater scoring rule by previous score and\n * current score\n * @param component the component content\n * @param previousScore the score from the last submit\n * @param currentScore the score from the current submit\n * @returns the scoring rule for the given previous score and current score\n */\n private getMultipleAttemptCRaterScoringRuleByScore(\n component: any,\n previousScore: any,\n currentScore: any\n ): any {\n if (previousScore != null && currentScore != null) {\n const cRater = component.cRater;\n if (cRater != null) {\n const multipleAttemptScoringRules = cRater.multipleAttemptScoringRules;\n if (multipleAttemptScoringRules != null) {\n for (let multipleAttemptScoringRule of multipleAttemptScoringRules) {\n if (multipleAttemptScoringRule != null) {\n const scoreSequence = multipleAttemptScoringRule.scoreSequence;\n if (scoreSequence != null) {\n /*\n * get the expected previous score and current score\n * that will satisfy the rule\n */\n const previousScoreMatch = scoreSequence[0];\n const currentScoreMatch = scoreSequence[1];\n\n if (\n previousScore.toString().match('[' + previousScoreMatch + ']') &&\n currentScore.toString().match('[' + currentScoreMatch + ']')\n ) {\n /*\n * the previous score and current score match the\n * expected scores so we have found the rule we want\n */\n return multipleAttemptScoringRule;\n }\n }\n }\n }\n }\n }\n }\n return null;\n }\n\n /**\n * Check if the item id is a valid CRater item id.\n * @param itemId A string.\n * @return A promise that returns whether the item id is valid.\n */\n makeCRaterVerifyRequest(itemId: string): Observable {\n return this.http.get(this.configService.getCRaterRequestURL() + '/verify', {\n params: new HttpParams().set('itemId', itemId)\n });\n }\n\n getCRaterResponse(responses: RawCRaterResponse, submitCounter: number): CRaterResponse {\n const cRaterResponse: CRaterResponse = new CRaterResponse();\n if (this.isSingleScore(responses)) {\n cRaterResponse.score = this.getScore(responses);\n } else {\n cRaterResponse.scores = this.getScores(responses);\n }\n cRaterResponse.ideas = this.getIdeas(responses);\n cRaterResponse.submitCounter = submitCounter;\n return cRaterResponse;\n }\n\n private isSingleScore(responses: RawCRaterResponse): boolean {\n return responses.scores != null;\n }\n\n private getScore(responses: RawCRaterResponse): number {\n return parseInt(responses.scores.raw_trim_round);\n }\n\n private getScores(responses: RawCRaterResponse): CRaterScore[] {\n const scores = [];\n for (const key in responses.trait_scores) {\n const value = responses.trait_scores[key];\n scores.push(\n new CRaterScore(\n key,\n parseInt(value.raw_trim_round),\n parseFloat(value.raw),\n parseInt(value.score_range_min),\n parseInt(value.score_range_max)\n )\n );\n }\n return scores;\n }\n\n private getIdeas(responses: RawCRaterResponse): CRaterIdea[] {\n const ideas = [];\n for (const key in responses.feedback?.ideas) {\n const value = responses.feedback.ideas[key];\n ideas.push(new CRaterIdea(key, value.detected));\n }\n return ideas;\n }\n\n getCRaterRubric(nodeId: string, componentId: string, componentType?: string): CRaterRubric {\n const componentContent = this.projectService.getComponent(nodeId, componentId);\n let rubricContent;\n if (componentType === 'OpenResponse') {\n rubricContent = (componentContent as OpenResponseContent).cRater?.rubric;\n } else {\n rubricContent = componentContent.cRaterRubric;\n }\n return new CRaterRubric(rubricContent);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 16,
+ "jsdoctags": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "CreateBranchService",
+ "id": "injectable-CreateBranchService-332fd19dd305e7353220b4cee638610a4bd97c797bbf5264a98bef705b4b085044bedadf9e9aed5244ef1de7f3c114480454a3a731b099e5ec78f09a42b18153",
+ "file": "src/assets/wise5/services/createBranchService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "addNewNodeIdsToParentGroup",
+ "args": [
+ {
+ "name": "branchStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 61,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "branchStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createBranch",
+ "args": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 13,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createMergeStep",
+ "args": [
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdBranchNodeTransitionsTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 49,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeIdBranchNodeTransitionsTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createNewNodeIds",
+ "args": [
+ {
+ "name": "pathCount",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string[]",
+ "typeParameters": [],
+ "line": 35,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "pathCount",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createPathSteps",
+ "args": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 43,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "addTransitionFromBranchNodeToPathNode",
+ "args": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "newNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 47,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "newNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "AuthorBranchService"
+ }
+ },
+ {
+ "name": "createPathStep",
+ "args": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 17,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "AuthorBranchService"
+ }
+ },
+ {
+ "name": "setBranchNodeTransitionLogic",
+ "args": [
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "criteria",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 40,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "criteria",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "AuthorBranchService"
+ }
+ },
+ {
+ "name": "setPathStepTransitions",
+ "args": [
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "mergeStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "mergeStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "AuthorBranchService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { TeacherProjectService } from './teacherProjectService';\nimport { AuthorBranchParams } from '../common/AuthorBranchParams';\nimport { Transition } from '../common/Transition';\nimport { AuthorBranchService } from './authorBranchService';\n\n@Injectable()\nexport class CreateBranchService extends AuthorBranchService {\n constructor(protected projectService: TeacherProjectService) {\n super(projectService);\n }\n\n createBranch(params: AuthorBranchParams): Promise {\n const branchNode = this.projectService.getNode(params.branchStepId);\n const nodeIdBranchNodeTransitionsTo =\n branchNode.transitionLogic.transitions.length > 0\n ? branchNode.transitionLogic.transitions[0].to\n : '';\n branchNode.transitionLogic.transitions = [];\n const newNodeIds = this.createNewNodeIds(params.pathCount);\n this.createPathSteps(params, branchNode, newNodeIds);\n const mergeStep: any =\n params.mergeStepId === ''\n ? this.createMergeStep(newNodeIds, nodeIdBranchNodeTransitionsTo)\n : this.projectService.getNode(params.mergeStepId);\n this.setPathStepTransitions(newNodeIds, mergeStep.id);\n this.setBranchNodeTransitionLogic(branchNode, params.criteria);\n if (params.mergeStepId === '') {\n newNodeIds.push(mergeStep.id);\n }\n this.addNewNodeIdsToParentGroup(params.branchStepId, newNodeIds);\n return this.projectService.saveProject();\n }\n\n private createNewNodeIds(pathCount: number): string[] {\n const newNodeIds = [];\n for (let i = 0; i < pathCount; i++) {\n newNodeIds.push(this.projectService.getNextAvailableNodeId(newNodeIds));\n }\n return newNodeIds;\n }\n\n private createPathSteps(params: AuthorBranchParams, branchNode: any, newNodeIds: string[]): void {\n for (let i = 0; i < newNodeIds.length; i++) {\n this.createPathStep(params, branchNode, newNodeIds[i], i);\n }\n }\n\n private createMergeStep(newNodeIds: string[], nodeIdBranchNodeTransitionsTo: string): any {\n const mergeStepNode = this.projectService.createNode($localize`Merge Step`);\n mergeStepNode.id = this.projectService.getNextAvailableNodeId(newNodeIds);\n if (nodeIdBranchNodeTransitionsTo !== '') {\n mergeStepNode.transitionLogic.transitions = [new Transition(nodeIdBranchNodeTransitionsTo)];\n }\n this.projectService.addNode(mergeStepNode);\n this.projectService.addApplicationNode(mergeStepNode);\n this.projectService.setIdToNode(mergeStepNode.id, mergeStepNode);\n return mergeStepNode;\n }\n\n private addNewNodeIdsToParentGroup(branchStepId: string, newNodeIds: string[]): void {\n const parentGroup = this.projectService.getParentGroup(branchStepId);\n parentGroup.ids.splice(parentGroup.ids.indexOf(branchStepId) + 1, 0, ...newNodeIds);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 8,
+ "jsdoctags": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [
+ "AuthorBranchService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "CreateComponentService",
+ "id": "injectable-CreateComponentService-4a93432aa396624b7efdd6a91ee4eaa8259d3fe120e23b1251a2bb81885822966de6edfe9b91fb72cdc0f71b39a2bffb8a2abf94b2f48d6c756687c556d3d773",
+ "file": "src/assets/wise5/services/createComponentService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "addComponentToNode",
+ "args": [
+ {
+ "name": "node",
+ "type": "Node",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "insertAfterComponentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "Node",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "insertAfterComponentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "create",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "insertAfterComponentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 21,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate a new component\ncomponent id. If this argument is null, we will place the new component\nin the first position.\n",
+ "description": "Create a new component\ncomponent id. If this argument is null, we will place the new component\nin the first position.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 475,
+ "end": 481,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 469,
+ "end": 474,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id to create the component in
\n"
+ },
+ {
+ "name": {
+ "pos": 533,
+ "end": 546,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentType"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 527,
+ "end": 532,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component type
\n"
+ },
+ {
+ "name": {
+ "pos": 578,
+ "end": 600,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "insertAfterComponentId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "pos": 572,
+ "end": 577,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "Insert the new component after the given\ncomponent id. If this argument is null, we will place the new component\nin the first position.
\n"
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { TeacherProjectService } from './teacherProjectService';\nimport { ComponentServiceLookupService } from './componentServiceLookupService';\nimport { Node } from '../common/Node';\n\n@Injectable()\nexport class CreateComponentService {\n constructor(\n private componentServiceLookupService: ComponentServiceLookupService,\n private projectService: TeacherProjectService\n ) {}\n\n /**\n * Create a new component\n * @param nodeId the node id to create the component in\n * @param componentType the component type\n * @param insertAfterComponentId Insert the new component after the given\n * component id. If this argument is null, we will place the new component\n * in the first position.\n */\n create(nodeId: string, componentType: string, insertAfterComponentId: string = null): any {\n const node = this.projectService.getNode(nodeId);\n const service = this.componentServiceLookupService.getService(componentType);\n const component = service.createComponent();\n if (service.componentHasWork(component)) {\n if (node.showSaveButton == false) {\n if (this.projectService.doesAnyComponentInNodeShowSubmitButton(node.id)) {\n component.showSaveButton = true;\n } else {\n node.showSaveButton = true;\n }\n }\n }\n this.addComponentToNode(node, component, insertAfterComponentId);\n return component;\n }\n\n private addComponentToNode(node: Node, component: any, insertAfterComponentId: string): void {\n const insertPosition =\n insertAfterComponentId == null\n ? 0\n : node.components.findIndex((c) => c.id === insertAfterComponentId) + 1;\n node.components.splice(insertPosition, 0, component);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "componentServiceLookupService",
+ "type": "ComponentServiceLookupService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 7,
+ "jsdoctags": [
+ {
+ "name": "componentServiceLookupService",
+ "type": "ComponentServiceLookupService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "DataExportService",
+ "id": "injectable-DataExportService-3c74c0ca6a3518b5ccf697a4a80f6ca6cfe60032c29290e748a8c8e6774dfb5fecae541ce27897df82e05f7464c67af2b938a4256757a2d1ff5b7833ceda2c2b",
+ "file": "src/assets/wise5/services/dataExportService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "createHttpParams",
+ "args": [
+ {
+ "name": "includeStudentWork",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "includeEvents",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "includeAnnotations",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "HttpParams",
+ "typeParameters": [],
+ "line": 89,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "includeStudentWork",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "includeEvents",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "includeAnnotations",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getExportURL",
+ "args": [
+ {
+ "name": "runId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "exportType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 101,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "runId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "exportType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getStudentEvents",
+ "args": [
+ {
+ "name": "events",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 50,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "events",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getTeacherEvents",
+ "args": [
+ {
+ "name": "events",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 56,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "events",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isStudentEvent",
+ "args": [
+ {
+ "name": "event",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 62,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "event",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isTeacherEvent",
+ "args": [
+ {
+ "name": "event",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 66,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "event",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "retrieveEventsExport",
+ "args": [
+ {
+ "name": "includeStudentEvents",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "includeTeacherEvents",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "includeNames",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "includeStudentEvents",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "includeTeacherEvents",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "includeNames",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "retrieveNotebookExport",
+ "args": [
+ {
+ "name": "exportType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 73,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "exportType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "retrieveNotificationsExport",
+ "args": [],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 78,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "retrieveStudentAssetsExport",
+ "args": [],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 82,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "retrieveStudentData",
+ "args": [
+ {
+ "name": "selectedNodes",
+ "type": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]"
+ },
+ {
+ "name": "includeStudentWork",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "includeEvents",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "includeAnnotations",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 16,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "selectedNodes",
+ "type": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "includeStudentWork",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "includeEvents",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "includeAnnotations",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { ConfigService } from './configService';\nimport { TeacherDataService } from './teacherDataService';\nimport { compressToEncodedURIComponent } from 'lz-string';\nimport { Observable, tap } from 'rxjs';\n\n@Injectable()\nexport class DataExportService {\n constructor(\n private configService: ConfigService,\n private http: HttpClient,\n private dataService: TeacherDataService\n ) {}\n\n retrieveStudentData(\n selectedNodes = [],\n includeStudentWork: boolean,\n includeEvents: boolean,\n includeAnnotations: boolean\n ): Observable {\n let params = this.createHttpParams(includeStudentWork, includeEvents, includeAnnotations);\n if (selectedNodes.length > 0) {\n params = params.set(\n 'components',\n compressToEncodedURIComponent(JSON.stringify(selectedNodes))\n );\n }\n return this.dataService.retrieveStudentData(params);\n }\n\n retrieveEventsExport(\n includeStudentEvents: boolean,\n includeTeacherEvents: boolean,\n includeNames: boolean\n ): Observable {\n const params = new HttpParams()\n .set('runId', this.configService.getRunId())\n .set('getStudentWork', 'false')\n .set('getAnnotations', 'false')\n .set('getEvents', 'false')\n .set('includeStudentEvents', includeStudentEvents + '')\n .set('includeTeacherEvents', includeTeacherEvents + '')\n .set('includeNames', includeNames + '');\n return this.http.get(this.configService.getConfigParam('runDataExportURL') + '/events', {\n params: params\n });\n }\n\n getStudentEvents(events: any[]): any[] {\n return events.filter((event: any) => {\n return this.isStudentEvent(event);\n });\n }\n\n getTeacherEvents(events: any[]): any[] {\n return events.filter((event: any) => {\n return this.isTeacherEvent(event);\n });\n }\n\n isStudentEvent(event: any): boolean {\n return !this.isTeacherEvent(event);\n }\n\n isTeacherEvent(event: any): boolean {\n return (\n this.configService.isTeacherWorkgroupId(event.workgroupId) ||\n this.configService.isTeacherUserId(event.userId)\n );\n }\n\n retrieveNotebookExport(exportType: string): Observable {\n const options = { params: new HttpParams().set('exportType', exportType) };\n return this.http.get(this.configService.getConfigParam('notebookURL'), options);\n }\n\n retrieveNotificationsExport(): Observable {\n return this.http.get(this.getExportURL(this.configService.getRunId(), 'notifications'));\n }\n\n retrieveStudentAssetsExport(): Promise {\n window.location.href = this.getExportURL(this.configService.getRunId(), 'studentAssets');\n return new Promise((resolve) => {\n resolve([]);\n });\n }\n\n private createHttpParams(\n includeStudentWork: boolean,\n includeEvents: boolean,\n includeAnnotations: boolean\n ): HttpParams {\n return new HttpParams()\n .set('runId', this.configService.getRunId())\n .set('getStudentWork', includeStudentWork)\n .set('getEvents', includeEvents)\n .set('getAnnotations', includeAnnotations);\n }\n\n getExportURL(runId: number, exportType: string): string {\n return this.configService.getConfigParam('runDataExportURL') + `/${runId}/${exportType}`;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "dataService",
+ "type": "TeacherDataService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 9,
+ "jsdoctags": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "dataService",
+ "type": "TeacherDataService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "DataService",
+ "id": "injectable-DataService-88c6a7683c45a98ed454952594acfd4e72f6125ea0812b7fb4a217098bd3c39e9a0cf4437081fd65829f9a9ad575c4f5b2c474d45bd3f4ce70b191698e978c62",
+ "file": "src/app/services/data.service.ts",
+ "properties": [
+ {
+ "name": "currentNode",
+ "defaultValue": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "null",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "currentNodeChanged$",
+ "defaultValue": "this.currentNodeChangedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "currentNodeChangedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 9,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "previousStep",
+ "defaultValue": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "null",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ },
+ {
+ "name": "studentWorkReceived$",
+ "defaultValue": "this.studentWorkReceivedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "studentWorkReceivedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "broadcastStudentWorkReceived",
+ "args": [
+ {
+ "name": "studentWork",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 53,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "studentWork",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getBranchPathTakenEventsByNodeId",
+ "args": [
+ {
+ "name": "currentNodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 27,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "currentNodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCurrentNode",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 16,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getCurrentNodeId",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 20,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "saveVLEEvent",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentType",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "category",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "event",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "eventData",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentType",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "category",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "event",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "eventData",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setCurrentNode",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 39,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setCurrentNodeByNodeId",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 35,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { ProjectService } from '../../assets/wise5/services/projectService';\n\n@Injectable()\nexport abstract class DataService {\n currentNode = null;\n previousStep = null;\n private currentNodeChangedSource: Subject = new Subject();\n public currentNodeChanged$ = this.currentNodeChangedSource.asObservable();\n private studentWorkReceivedSource: Subject = new Subject();\n public studentWorkReceived$ = this.studentWorkReceivedSource.asObservable();\n\n constructor(protected projectService: ProjectService) {}\n\n getCurrentNode(): any {\n return this.currentNode;\n }\n\n getCurrentNodeId(): string {\n if (this.currentNode != null) {\n return this.currentNode.id;\n }\n return null;\n }\n\n getBranchPathTakenEventsByNodeId(currentNodeId): any[] {\n return [];\n }\n\n // refactor: this should be only in studentDataService\n saveVLEEvent(nodeId, componentId, componentType, category, event, eventData) {}\n\n // refactor: replace this with setCurrentNode()\n setCurrentNodeByNodeId(nodeId: string): void {\n this.setCurrentNode(this.projectService.getNodeById(nodeId));\n }\n\n setCurrentNode(node: any): void {\n const previousCurrentNode = this.currentNode;\n this.currentNode = node;\n if (previousCurrentNode !== node) {\n if (previousCurrentNode && !this.projectService.isGroupNode(previousCurrentNode.id)) {\n this.previousStep = previousCurrentNode;\n }\n this.currentNodeChangedSource.next({\n previousNode: previousCurrentNode,\n currentNode: this.currentNode\n });\n }\n }\n\n broadcastStudentWorkReceived(studentWork: any) {\n this.studentWorkReceivedSource.next(studentWork);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 12,
+ "jsdoctags": [
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "DeleteBranchService",
+ "id": "injectable-DeleteBranchService-68a6a0b0531b5e995b86da0742bae1ceeacaadae76e870dcba2044739f77b1e42ac674d755cfd6bb694f3cac5157af90648532ee78047c67368e112a142749fc",
+ "file": "src/assets/wise5/services/deleteBranchService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "deleteBranch",
+ "args": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "targetId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 8,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "targetId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "deleteBranchPath",
+ "args": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branch",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "targetId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 35,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nRemove a branch path by removing all the branch path taken constraints\nfrom the steps in the branch path, resetting the transitions in the\nsteps in the branch path, and removing the transition corresponding to\nthe branch path in this branch point node.\n",
+ "description": "Remove a branch path by removing all the branch path taken constraints\nfrom the steps in the branch path, resetting the transitions in the\nsteps in the branch path, and removing the transition corresponding to\nthe branch path in this branch point node.
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": {
+ "pos": 1552,
+ "end": 1558,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "branch"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1546,
+ "end": 1551,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the branch object
\n"
+ },
+ {
+ "name": "targetId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "deleteBranchPathAndPlaceAfter",
+ "args": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branch",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branchStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdToPlaceAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdAfterMergeStep",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 50,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "branch",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "branchStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeIdToPlaceAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeIdAfterMergeStep",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "removeBranchPathAndTransition",
+ "args": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branch",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "targetId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 74,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "branch",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "targetId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { TeacherProjectService } from './teacherProjectService';\n\n@Injectable()\nexport class DeleteBranchService {\n constructor(private projectService: TeacherProjectService) {}\n\n deleteBranch(branchPaths: any[], targetId: string): void {\n for (let bp = 0; bp < branchPaths.length; bp++) {\n const branchPath = branchPaths[bp];\n this.deleteBranchPath(branchPaths, branchPath, targetId);\n bp--; // shift the counter back one because we have just removed a branch path\n }\n const nodeIdAfter = this.projectService.getNodeIdAfter(targetId);\n /*\n * update the transition of this step to point to the next step\n * in the project. this may be different than the next step\n * if it was still the branch point.\n */\n this.projectService.setTransition(targetId, nodeIdAfter);\n this.projectService.setTransitionLogicField(targetId, 'howToChooseAmongAvailablePaths', null);\n this.projectService.setTransitionLogicField(targetId, 'whenToChoosePath', null);\n this.projectService.setTransitionLogicField(targetId, 'canChangePath', null);\n this.projectService.setTransitionLogicField(targetId, 'maxPathsVisitable', null);\n this.projectService.calculateNodeNumbers();\n }\n\n /**\n * Remove a branch path by removing all the branch path taken constraints\n * from the steps in the branch path, resetting the transitions in the\n * steps in the branch path, and removing the transition corresponding to\n * the branch path in this branch point node.\n * @param branch the branch object\n */\n private deleteBranchPath(branchPaths: any[], branch: any, targetId: string): void {\n for (const nodeInBranchPath of branch.nodesInBranchPath) {\n const nodeId = nodeInBranchPath.nodeId;\n this.projectService.removeBranchPathTakenNodeConstraintsIfAny(nodeId);\n /*\n * update the transition of the step to point to the next step\n * in the project. this may be different than the next step\n * if it was still in the branch path.\n */\n const nodeIdAfter = this.projectService.getNodeIdAfter(nodeId);\n this.projectService.setTransition(nodeId, nodeIdAfter);\n }\n this.removeBranchPathAndTransition(branchPaths, branch, targetId);\n }\n\n deleteBranchPathAndPlaceAfter(\n branchPaths: any[],\n branch: any,\n branchStepId: string,\n nodeIdToPlaceAfter: string,\n nodeIdAfterMergeStep: string\n ): void {\n for (const nodeInBranchPath of branch.nodesInBranchPath) {\n const nodeId = nodeInBranchPath.nodeId;\n this.projectService.removeBranchPathTakenNodeConstraintsIfAny(nodeId);\n this.projectService.setTransition(nodeIdToPlaceAfter, nodeId);\n this.projectService.removeNodeIdFromGroups(nodeId);\n this.projectService.insertNodeAfterInGroups(nodeId, nodeIdToPlaceAfter);\n nodeIdToPlaceAfter = nodeId;\n }\n if (nodeIdAfterMergeStep == null) {\n const transitionLogic = this.projectService.getNode(nodeIdToPlaceAfter).getTransitionLogic();\n transitionLogic.transitions = [];\n } else {\n this.projectService.setTransition(nodeIdToPlaceAfter, nodeIdAfterMergeStep);\n }\n this.removeBranchPathAndTransition(branchPaths, branch, branchStepId);\n }\n\n private removeBranchPathAndTransition(branchPaths: any[], branch: any, targetId: string): void {\n const branchPathIndex = branchPaths.indexOf(branch);\n branchPaths.splice(branchPathIndex, 1);\n const node = this.projectService.getNodeById(targetId);\n node.transitionLogic.transitions.splice(branchPathIndex, 1);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 5,
+ "jsdoctags": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "DeleteNodeService",
+ "id": "injectable-DeleteNodeService-b843aff89bbf7d89d0068fcf18f388f17449947613e1739296cead168d6caf75ebc737840c445212d1893683f20ebf7475f8b04217a56deb3363c31c8921e8ee",
+ "file": "src/assets/wise5/services/deleteNodeService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "containsStartNodeId",
+ "args": [
+ {
+ "name": "groupId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 58,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "groupId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "deleteNode",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 19,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nDelete a node from the project and update transitions.\nIf we are deleting the project start node id, we will need to change it to the\nnext logical node id that will be used as the project start.\n\n",
+ "description": "Delete a node from the project and update transitions.\nIf we are deleting the project start node id, we will need to change it to the\nnext logical node id that will be used as the project start.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 640,
+ "end": 646,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 634,
+ "end": 639,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id to delete from the project. It can be a step or an activity.
\n"
+ }
+ ]
+ },
+ {
+ "name": "isProjectStartNodeIdOrContainsProjectStartNodeId",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 51,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "removeChildNodes",
+ "args": [
+ {
+ "name": "groupId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 120,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "groupId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "removeNodeIdFromNodes",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 131,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setGroupStartIdToNextChildId",
+ "args": [
+ {
+ "name": "group",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 35,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "group",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateProjectStartNodeIdToNextLogicalNode",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 69,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateProjectStartNodeIdToNextLogicalNodeForRemovingGroup",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 82,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nSet the startNodeId of the specified group to the first node of the next group.\nIf the next group doesn't have any nodes, startNodeId should point\nto the next group.\n",
+ "description": "Set the startNodeId of the specified group to the first node of the next group.\nIf the next group doesn't have any nodes, startNodeId should point\nto the next group.
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateProjectStartNodeIdToNextLogicalNodeForRemovingStep",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nSet the startNodeId to the next node in the transitions.\nIf there are no transitions, set it to the parent group of the node.\n",
+ "description": "Set the startNodeId to the next node in the transitions.\nIf there are no transitions, set it to the parent group of the node.
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { TeacherProjectService } from './teacherProjectService';\nimport { RemoveNodeIdFromTransitionsService } from './removeNodeIdFromTransitionsService';\n\n@Injectable()\nexport class DeleteNodeService {\n constructor(\n protected ProjectService: TeacherProjectService,\n private removeNodeIdFromTransitionsService: RemoveNodeIdFromTransitionsService\n ) {}\n\n /**\n * Delete a node from the project and update transitions.\n * If we are deleting the project start node id, we will need to change it to the\n * next logical node id that will be used as the project start.\n *\n * @param nodeId the node id to delete from the project. It can be a step or an activity.\n */\n deleteNode(nodeId: string): void {\n const parentGroup = this.ProjectService.getParentGroup(nodeId);\n if (parentGroup != null && parentGroup.startId === nodeId) {\n this.setGroupStartIdToNextChildId(parentGroup);\n }\n if (this.isProjectStartNodeIdOrContainsProjectStartNodeId(nodeId)) {\n this.updateProjectStartNodeIdToNextLogicalNode(nodeId);\n }\n if (this.ProjectService.isGroupNode(nodeId)) {\n this.removeChildNodes(nodeId);\n }\n this.removeNodeIdFromTransitionsService.remove(nodeId);\n this.ProjectService.removeNodeIdFromGroups(nodeId);\n this.removeNodeIdFromNodes(nodeId);\n }\n\n private setGroupStartIdToNextChildId(group: any): void {\n let hasSetNewStartId = false;\n const transitions = this.ProjectService.getTransitionsByFromNodeId(group.startId);\n if (transitions.length > 0) {\n const transition = transitions[0];\n const toNodeId = transition.to;\n if (this.ProjectService.isNodeInGroup(toNodeId, group.id)) {\n group.startId = toNodeId;\n hasSetNewStartId = true;\n }\n }\n if (!hasSetNewStartId) {\n group.startId = '';\n }\n }\n\n private isProjectStartNodeIdOrContainsProjectStartNodeId(nodeId: string): boolean {\n return (\n this.ProjectService.getStartNodeId() === nodeId ||\n (this.ProjectService.isGroupNode(nodeId) && this.containsStartNodeId(nodeId))\n );\n }\n\n private containsStartNodeId(groupId: string): boolean {\n const group = this.ProjectService.getNodeById(groupId);\n const projectStartNodeId = this.ProjectService.getStartNodeId();\n for (let childId of group.ids) {\n if (childId === projectStartNodeId) {\n return true;\n }\n }\n return false;\n }\n\n private updateProjectStartNodeIdToNextLogicalNode(nodeId: string): void {\n if (this.ProjectService.isGroupNode(nodeId)) {\n this.updateProjectStartNodeIdToNextLogicalNodeForRemovingGroup(nodeId);\n } else {\n this.updateProjectStartNodeIdToNextLogicalNodeForRemovingStep(nodeId);\n }\n }\n\n /**\n * Set the startNodeId of the specified group to the first node of the next group.\n * If the next group doesn't have any nodes, startNodeId should point\n * to the next group.\n */\n private updateProjectStartNodeIdToNextLogicalNodeForRemovingGroup(nodeId: string): void {\n const transitions = this.ProjectService.getTransitionsByFromNodeId(nodeId);\n if (transitions.length == 0) {\n this.ProjectService.setStartNodeId('group0');\n } else {\n let nextNodeId = transitions[0].to;\n if (this.ProjectService.isGroupNode(nextNodeId)) {\n const nextGroupStartId = this.ProjectService.getGroupStartId(nextNodeId);\n if (nextGroupStartId == null || nextGroupStartId === '') {\n this.ProjectService.setStartNodeId(nextNodeId);\n } else {\n this.ProjectService.setStartNodeId(nextGroupStartId);\n }\n } else {\n this.ProjectService.setStartNodeId(nextNodeId);\n }\n }\n }\n\n /**\n * Set the startNodeId to the next node in the transitions.\n * If there are no transitions, set it to the parent group of the node.\n */\n private updateProjectStartNodeIdToNextLogicalNodeForRemovingStep(nodeId: string): void {\n const transitions = this.ProjectService.getTransitionsByFromNodeId(nodeId);\n const parentGroupId = this.ProjectService.getParentGroupId(nodeId);\n if (transitions.length == 0) {\n this.ProjectService.setStartNodeId(parentGroupId);\n } else {\n let nextNodeId = transitions[0].to;\n if (this.ProjectService.isNodeInGroup(nextNodeId, parentGroupId)) {\n this.ProjectService.setStartNodeId(nextNodeId);\n } else {\n this.ProjectService.setStartNodeId(this.ProjectService.getParentGroupId(nodeId));\n }\n }\n }\n\n private removeChildNodes(groupId: string): void {\n const group = this.ProjectService.getNodeById(groupId);\n for (let i = 0; i < group.ids.length; i++) {\n const childId = group.ids[i];\n this.removeNodeIdFromTransitionsService.remove(childId);\n this.ProjectService.removeNodeIdFromGroups(childId);\n this.removeNodeIdFromNodes(childId);\n i--; // so it won't skip the next element\n }\n }\n\n private removeNodeIdFromNodes(nodeId: string): void {\n const nodes = this.ProjectService.project.nodes;\n for (let n = 0; n < nodes.length; n++) {\n const node = nodes[n];\n if (node != null) {\n if (nodeId === node.id) {\n nodes.splice(n, 1);\n }\n }\n }\n const inactiveNodes = this.ProjectService.project.inactiveNodes;\n if (inactiveNodes != null) {\n for (let i = 0; i < inactiveNodes.length; i++) {\n const inactiveNode = inactiveNodes[i];\n if (inactiveNode != null) {\n if (nodeId === inactiveNode.id) {\n inactiveNodes.splice(i, 1);\n }\n }\n }\n }\n this.ProjectService.idToNode[nodeId] = null;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "ProjectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "removeNodeIdFromTransitionsService",
+ "type": "RemoveNodeIdFromTransitionsService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 6,
+ "jsdoctags": [
+ {
+ "name": "ProjectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "removeNodeIdFromTransitionsService",
+ "type": "RemoveNodeIdFromTransitionsService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "DeleteTranslationsService",
+ "id": "injectable-DeleteTranslationsService-3f7e846e6c26ac37086788d9ab0004ef30cff1a2d38e111680f5dcb8b1e9f2008bea826818040882da781444b7af6ebb223f111adc4d74d03d8b05f8c04e4506",
+ "file": "src/assets/wise5/services/deleteTranslationsService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "deleteComponents",
+ "args": [
+ {
+ "name": "components",
+ "type": "ComponentContent[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 14,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123,
+ 134
+ ],
+ "jsdoctags": [
+ {
+ "name": "components",
+ "type": "ComponentContent[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "tryDeleteComponents",
+ "args": [
+ {
+ "name": "components",
+ "type": "ComponentContent[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 8,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "components",
+ "type": "ComponentContent[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "fetchAllTranslations",
+ "args": [],
+ "optional": false,
+ "returnType": "Promise>",
+ "typeParameters": [],
+ "line": 20,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124,
+ 134
+ ],
+ "inheritance": {
+ "file": "EditTranslationsService"
+ }
+ },
+ {
+ "name": "getI18NKey",
+ "args": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "key",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 50,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "key",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "EditTranslationsService"
+ }
+ },
+ {
+ "name": "getI18NKeys",
+ "args": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 36,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "EditTranslationsService"
+ }
+ },
+ {
+ "name": "getSaveTranslationRequest",
+ "args": [
+ {
+ "name": "translations",
+ "type": "Translations",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "language",
+ "type": "Language",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 54,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "translations",
+ "type": "Translations",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "language",
+ "type": "Language",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "EditTranslationsService"
+ }
+ },
+ {
+ "name": "fetchTranslations",
+ "args": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 16,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ProjectTranslationService"
+ }
+ },
+ {
+ "name": "getTranslationMappingURL",
+ "args": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 24,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ProjectTranslationService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, forkJoin } from 'rxjs';\nimport { ComponentContent } from '../common/ComponentContent';\nimport { EditTranslationsService } from './editProjectTranslationsService';\n\n@Injectable()\nexport class DeleteTranslationsService extends EditTranslationsService {\n tryDeleteComponents(components: ComponentContent[]): void {\n if (this.projectService.getLocale().hasTranslations()) {\n this.deleteComponents(components);\n }\n }\n\n private async deleteComponents(components: ComponentContent[]): Promise {\n const i18nKeys = components.flatMap((component) => this.getI18NKeys(component));\n const saveTranslationRequests: Observable[] = [];\n (await this.fetchAllTranslations()).forEach((translations, language) => {\n i18nKeys.forEach((i18nKey) => delete translations[i18nKey]);\n saveTranslationRequests.push(this.getSaveTranslationRequest(translations, language));\n });\n forkJoin(saveTranslationRequests).subscribe();\n }\n}\n",
+ "extends": [
+ "EditTranslationsService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "DialogGuidanceFeedbackService",
+ "id": "injectable-DialogGuidanceFeedbackService-3fc8a3e22575731071bbf7edc22ded175d025ada0136fec58aff42f8723660cb56b79299237eb44c60a02b9cb2ec7da0ba22e0c92313bea6336c138345e252d8",
+ "file": "src/assets/wise5/services/dialogGuidanceFeedbackService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "getCountFeedbackRuleShown",
+ "args": [
+ {
+ "name": "latestSubmitComponentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "feedbackRule",
+ "type": "FeedbackRule",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 27,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "latestSubmitComponentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "feedbackRule",
+ "type": "FeedbackRule",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getFeedbackText",
+ "args": [
+ {
+ "name": "component",
+ "type": "DialogGuidanceComponent",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "feedbackRule",
+ "type": "FeedbackRule",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 10,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "DialogGuidanceComponent",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "feedbackRule",
+ "type": "FeedbackRule",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getFeedbackTextVersion2",
+ "args": [
+ {
+ "name": "component",
+ "type": "DialogGuidanceComponent",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "feedbackRule",
+ "type": "FeedbackRule",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 16,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "DialogGuidanceComponent",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "feedbackRule",
+ "type": "FeedbackRule",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { FeedbackRule } from '../components/common/feedbackRule/FeedbackRule';\nimport { StudentDataService } from './studentDataService';\nimport { DialogGuidanceComponent } from '../components/dialogGuidance/DialogGuidanceComponent';\n\n@Injectable()\nexport class DialogGuidanceFeedbackService {\n constructor(private studentDataService: StudentDataService) {}\n\n getFeedbackText(component: DialogGuidanceComponent, feedbackRule: FeedbackRule): string {\n return component.isVersion1()\n ? feedbackRule.feedback\n : this.getFeedbackTextVersion2(component, feedbackRule);\n }\n\n private getFeedbackTextVersion2(component: DialogGuidanceComponent, feedbackRule: FeedbackRule) {\n const latestSubmitComponentState = this.studentDataService.getLatestSubmitComponentState(\n component.nodeId,\n component.id\n );\n return feedbackRule.feedback[\n this.getCountFeedbackRuleShown(latestSubmitComponentState, feedbackRule) %\n feedbackRule.feedback.length\n ];\n }\n\n private getCountFeedbackRuleShown(\n latestSubmitComponentState: any,\n feedbackRule: FeedbackRule\n ): number {\n return latestSubmitComponentState == null\n ? 0\n : latestSubmitComponentState.studentData.responses.filter(\n (response) => response.feedbackRuleId === feedbackRule.id\n ).length;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "studentDataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 7,
+ "jsdoctags": [
+ {
+ "name": "studentDataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "DialogGuidanceService",
+ "id": "injectable-DialogGuidanceService-bed7174994cef22f07d53cf5704565a30989d8f3c8c6fb8ee052c72257898a7b266f334b825ad18f44de09d77e4c8c2d10f1a05469170ae83043ad43487e41d9",
+ "file": "src/assets/wise5/components/dialogGuidance/dialogGuidanceService.ts",
+ "properties": [
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 15,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 11,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 28,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 118,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the component state has student work. Sometimes a component\nstate may be created if the student visits a component but doesn't\nactually perform any work. This is where we will check if the student\nactually performed any work.\n",
+ "description": "Check if the component state has student work. Sometimes a component\nstate may be created if the student visits a component but doesn't\nactually perform any work. This is where we will check if the student\nactually performed any work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3634,
+ "end": 3648,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3628,
+ "end": 3633,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state object
\n"
+ },
+ {
+ "name": {
+ "pos": 3688,
+ "end": 3704,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3682,
+ "end": 3687,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3733,
+ "end": 3739,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the component state has any work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { ComputerAvatarService } from '../../services/computerAvatarService';\nimport { ComponentService } from '../componentService';\n\n@Injectable()\nexport class DialogGuidanceService extends ComponentService {\n constructor(protected computerAvatarService: ComputerAvatarService) {\n super();\n }\n\n getComponentTypeLabel(): string {\n return $localize`Dialog Guidance`;\n }\n\n createComponent() {\n const component: any = super.createComponent();\n component.type = 'DialogGuidance';\n component.itemId = '';\n component.feedbackRules = [];\n component.isComputerAvatarEnabled = false;\n component.computerAvatarSettings =\n this.computerAvatarService.getDefaultComputerAvatarSettings();\n component.version = 2;\n component.cRaterRubric = { ideas: [] };\n return component;\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any) {\n return componentStates.length > 0;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "computerAvatarService",
+ "type": "ComputerAvatarService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 6,
+ "jsdoctags": [
+ {
+ "name": "computerAvatarService",
+ "type": "ComputerAvatarService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "DiscussionService",
+ "id": "injectable-DiscussionService-20b15511c1870a6c79db44adafcb04715c5a0534f2f0a4993cbcafadf94af66f185566ca7348a14482b2052eda5db48d27cd76e6d322e1fe5ff0de498166d278",
+ "file": "src/assets/wise5/components/discussion/discussionService.ts",
+ "properties": [
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "combineClassmatesResponses",
+ "args": [
+ {
+ "name": "responses",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "responses",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 145,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 137,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 141,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 22,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getClassmateResponses",
+ "args": [
+ {
+ "name": "runId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 107,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "runId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getClassmateResponsesFromComponents",
+ "args": [
+ {
+ "name": "runId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "components",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 79,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "runId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "components",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getClassResponses",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotations",
+ "type": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]"
+ },
+ {
+ "name": "isStudentMode",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 211,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "annotations",
+ "type": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isStudentMode",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getLatestInappropriateFlagAnnotationByStudentWorkId",
+ "args": [
+ {
+ "name": "annotations",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]"
+ },
+ {
+ "name": "studentWorkId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 199,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "annotations",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentWorkId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getLevel1Responses",
+ "args": [
+ {
+ "name": "classResponses",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isGradingMode",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 285,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the level 1 responses which are posts that are not a reply to another response.\n",
+ "description": "Get the level 1 responses which are posts that are not a reply to another response.
\n",
+ "jsdoctags": [
+ {
+ "name": "classResponses",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isGradingMode",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "tagName": {
+ "pos": 9173,
+ "end": 9179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "an object containing responses that are not a reply to another response
\n"
+ }
+ ]
+ },
+ {
+ "name": "getResponsesMap",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 262,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasAnyComponentStateWithResponse",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 47,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasComponentStateForConnectedComponent",
+ "args": [
+ {
+ "name": "connectedComponent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 68,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "connectedComponent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasShowWorkConnectedComponentThatHasWork",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 51,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 31,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isCompletedV2",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 35,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isComponentHasStarterSentence",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 159,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isInappropriateFlagDeleteAnnotation",
+ "args": [
+ {
+ "name": "annotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 242,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "annotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isStudentResponseDifferentFromStarterSentence",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 164,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isStudentWorkHasAttachment",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 175,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isStudentWorkHasText",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 170,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isTopLevelComponentStateIdFound",
+ "args": [
+ {
+ "name": "topLevelComponentStateIdsFound",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStateId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 130,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "topLevelComponentStateIdsFound",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStateId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isTopLevelPost",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 126,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setUsernames",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 246,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "threadHasPostFromComponentAndWorkgroupId",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 180,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { ComponentService } from '../componentService';\nimport { ConfigService } from '../../services/configService';\nimport { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { forkJoin, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { serverSaveTimeComparator } from '../../common/object/object';\n\n@Injectable()\nexport class DiscussionService extends ComponentService {\n constructor(\n protected configService: ConfigService,\n protected http: HttpClient\n ) {\n super();\n }\n\n getComponentTypeLabel(): string {\n return $localize`Discussion`;\n }\n\n createComponent() {\n const component: any = super.createComponent();\n component.type = 'Discussion';\n component.prompt = '';\n component.isStudentAttachmentEnabled = true;\n component.gateClassmateResponses = true;\n return component;\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any): boolean {\n throw new Error('No longer used');\n }\n\n isCompletedV2(node: any, component: any, studentData: any): boolean {\n if (this.hasShowWorkConnectedComponentThatHasWork(component, studentData)) {\n const nodeEvents = studentData.events.filter((event) => event.nodeId == node.id);\n return this.hasNodeEnteredEvent(nodeEvents);\n }\n const componentStates = studentData.componentStates.filter(\n (componentState) =>\n componentState.nodeId === node.id && componentState.componentId == component.id\n );\n return this.hasAnyComponentStateWithResponse(componentStates);\n }\n\n private hasAnyComponentStateWithResponse(componentStates: any[]): boolean {\n return componentStates.some((componentState) => componentState.studentData.response != null);\n }\n\n private hasShowWorkConnectedComponentThatHasWork(\n componentContent: any,\n studentData: any\n ): boolean {\n const connectedComponents = componentContent.connectedComponents;\n if (connectedComponents != null) {\n for (const connectedComponent of connectedComponents) {\n if (connectedComponent.type === 'showWork') {\n if (this.hasComponentStateForConnectedComponent(connectedComponent, studentData)) {\n return true;\n }\n }\n }\n }\n return false;\n }\n\n private hasComponentStateForConnectedComponent(\n connectedComponent: any,\n studentData: any\n ): boolean {\n return studentData.componentStates.some(\n (componentState) =>\n componentState.nodeId === connectedComponent.nodeId &&\n componentState.componentId === connectedComponent.componentId\n );\n }\n\n getClassmateResponsesFromComponents(\n runId: number,\n periodId: number,\n components: any[]\n ): Observable {\n const requests = components.map((component) =>\n this.getClassmateResponses(runId, periodId, component.nodeId, component.componentId)\n );\n return forkJoin(requests).pipe(\n map((responses: any[]) => {\n return this.combineClassmatesResponses(responses);\n })\n );\n }\n\n private combineClassmatesResponses(responses: any[]): any {\n const studentWork = [];\n const annotations = [];\n responses.forEach((response) => {\n studentWork.push(...response.studentWork);\n annotations.push(...response.annotations);\n });\n return {\n annotations: annotations,\n studentWork: studentWork\n };\n }\n\n getClassmateResponses(\n runId: number,\n periodId: number,\n nodeId: string,\n componentId: string\n ): Observable {\n const studentWorkRequest = this.http.get(\n `/api/classmate/discussion/student-work/${runId}/${periodId}/${nodeId}/${componentId}`\n );\n const annotationsRequest = this.http.get(\n `/api/classmate/discussion/annotations/${runId}/${periodId}/${nodeId}/${componentId}`\n );\n return forkJoin([studentWorkRequest, annotationsRequest]).pipe(\n map((response) => {\n return { studentWork: response[0], annotations: response[1] };\n })\n );\n }\n\n isTopLevelPost(componentState: any) {\n return componentState.studentData.componentStateIdReplyingTo == null;\n }\n\n isTopLevelComponentStateIdFound(\n topLevelComponentStateIdsFound: string[],\n componentStateId: string\n ) {\n return topLevelComponentStateIdsFound.indexOf(componentStateId) !== -1;\n }\n\n componentUsesSaveButton() {\n return false;\n }\n\n componentUsesSubmitButton() {\n return false;\n }\n\n componentStateHasStudentWork(componentState: any, componentContent: any) {\n if (this.isStudentWorkHasAttachment(componentState)) {\n return true;\n }\n if (this.isComponentHasStarterSentence(componentContent)) {\n return (\n this.isStudentWorkHasText(componentState) &&\n this.isStudentResponseDifferentFromStarterSentence(componentState, componentContent)\n );\n } else {\n return this.isStudentWorkHasText(componentState);\n }\n }\n\n isComponentHasStarterSentence(componentContent: any) {\n const starterSentence = componentContent.starterSentence;\n return starterSentence != null && starterSentence !== '';\n }\n\n isStudentResponseDifferentFromStarterSentence(componentState: any, componentContent: any) {\n const response = componentState.studentData.response;\n const starterSentence = componentContent.starterSentence;\n return response !== starterSentence;\n }\n\n isStudentWorkHasText(componentState: any) {\n const response = componentState.studentData.response;\n return response != null && response !== '';\n }\n\n isStudentWorkHasAttachment(componentState: any) {\n const attachments = componentState.studentData.attachments;\n return attachments != null && attachments.length > 0;\n }\n\n threadHasPostFromComponentAndWorkgroupId(\n componentState: any,\n componentId: string,\n workgroupId: number\n ): any {\n if (componentState.componentId === componentId && componentState.workgroupId === workgroupId) {\n return true;\n }\n for (const replyComponentState of componentState.replies) {\n if (\n replyComponentState.componentId === componentId &&\n replyComponentState.workgroupId === workgroupId\n ) {\n return true;\n }\n }\n return false;\n }\n\n getLatestInappropriateFlagAnnotationByStudentWorkId(\n annotations: any[] = [],\n studentWorkId: number\n ): any {\n for (const annotation of annotations.sort(serverSaveTimeComparator).reverse()) {\n if (studentWorkId === annotation.studentWorkId && annotation.type === 'inappropriateFlag') {\n return annotation;\n }\n }\n return null;\n }\n\n getClassResponses(\n componentStates: any[],\n annotations = [],\n isStudentMode: boolean = false\n ): any[] {\n const classResponses = [];\n componentStates = componentStates.sort(serverSaveTimeComparator);\n for (const componentState of componentStates) {\n if (componentState.studentData.isSubmit) {\n componentState.replies = [];\n this.setUsernames(componentState);\n const latestInappropriateFlagAnnotation =\n this.getLatestInappropriateFlagAnnotationByStudentWorkId(annotations, componentState.id);\n if (isStudentMode) {\n if (\n latestInappropriateFlagAnnotation == null ||\n !this.isInappropriateFlagDeleteAnnotation(latestInappropriateFlagAnnotation)\n ) {\n classResponses.push(componentState);\n }\n } else {\n if (latestInappropriateFlagAnnotation != null) {\n componentState.latestInappropriateFlagAnnotation = latestInappropriateFlagAnnotation;\n }\n classResponses.push(componentState);\n }\n }\n }\n return classResponses;\n }\n\n isInappropriateFlagDeleteAnnotation(annotation: any): boolean {\n return annotation.data.action === 'Delete';\n }\n\n setUsernames(componentState: any): void {\n const workgroupId = componentState.workgroupId;\n const usernames = this.configService.getUsernamesByWorkgroupId(workgroupId);\n if (usernames.length > 0) {\n componentState.usernames = this.configService.getUsernamesStringByWorkgroupId(workgroupId);\n } else if (componentState.usernamesArray != null) {\n componentState.usernames = componentState.usernamesArray\n .map(function (obj) {\n return obj.name;\n })\n .join(', ');\n } else {\n componentState.usernames = this.configService.getUserIdsStringByWorkgroupId(workgroupId);\n }\n }\n\n getResponsesMap(componentStates: any[]): any {\n const responsesMap: any = {};\n for (const componentState of componentStates) {\n responsesMap[componentState.id] = componentState;\n }\n for (const componentState of componentStates) {\n const componentStateIdReplyingTo = componentState.studentData.componentStateIdReplyingTo;\n if (componentStateIdReplyingTo) {\n if (\n responsesMap[componentStateIdReplyingTo] &&\n responsesMap[componentStateIdReplyingTo].replies\n ) {\n responsesMap[componentStateIdReplyingTo].replies.push(componentState);\n }\n }\n }\n return responsesMap;\n }\n\n /**\n * Get the level 1 responses which are posts that are not a reply to another response.\n * @return an object containing responses that are not a reply to another response\n */\n getLevel1Responses(\n classResponses: any[],\n componentId: string,\n workgroupId: number,\n isGradingMode: boolean = false\n ): any {\n const allResponses = [];\n const oddResponses = [];\n const evenResponses = [];\n for (const [index, classResponse] of Object.entries(classResponses)) {\n if (classResponse.studentData.componentStateIdReplyingTo == null) {\n if (\n isGradingMode &&\n !this.threadHasPostFromComponentAndWorkgroupId(classResponse, componentId, workgroupId)\n ) {\n continue;\n }\n if (Number(index) % 2 === 0) {\n evenResponses.push(classResponse);\n } else {\n oddResponses.push(classResponse);\n }\n allResponses.push(classResponse);\n }\n }\n return {\n all: allResponses.reverse(),\n col1: oddResponses.reverse(),\n col2: evenResponses.reverse()\n };\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 10,
+ "jsdoctags": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "DrawService",
+ "id": "injectable-DrawService-ba7da5b756915bc70f5597ddcf552277113e09632a74c3b2d70727459bab4c43217b608fcc38218be2d497c6eee75c5cb440783ef10f923de489772d610325a8",
+ "file": "src/assets/wise5/components/draw/drawService.ts",
+ "properties": [
+ {
+ "name": "toolFieldToLabel",
+ "defaultValue": "{\n select: 'Select tool',\n line: 'Line tool (click and hold to show available line types)',\n shape: 'Basic shape tool (click and hold to show available shapes)',\n freeHand: 'Free hand drawing tool',\n text: 'Text tool (click and hold to show available font sizes)',\n stamp: 'Stamp tool (click and hold to show available categories)',\n strokeColor: 'Stroke color (click and hold to show available colors)',\n fillColor: 'Fill color (click and hold to show available colors)',\n clone: 'Clone tool',\n strokeWidth: 'Stroke width (click and hold to show available options)',\n sendBack: 'Send selected objects to back',\n sendForward: 'Send selected objects to front',\n undo: 'Undo',\n redo: 'Redo',\n delete: 'Delete selected objects'\n }",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16
+ },
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 111,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "generateImageFromRenderedComponentState",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nThe component state has been rendered in a element\nand now we want to take a snapshot of the work.\n",
+ "description": "The component state has been rendered in a element\nand now we want to take a snapshot of the work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 4867,
+ "end": 4881,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4861,
+ "end": 4866,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The component state that has been rendered.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 4932,
+ "end": 4938,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "A promise that will return an image object.
\n"
+ }
+ ]
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDrawingToolCanvas",
+ "args": [
+ {
+ "name": "drawingToolId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 166,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "drawingToolId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getDrawingToolId",
+ "args": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 68,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasComponentStateWithDrawData",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 92,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasComponentStateWithIsSubmitTrue",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 83,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "initializeDrawingTool",
+ "args": [
+ {
+ "name": "drawingToolId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "stamps",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "{}"
+ },
+ {
+ "name": "width",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "800"
+ },
+ {
+ "name": "height",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "600"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 170,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "drawingToolId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "stamps",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "{}",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "width",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "800",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "height",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "600",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 72,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isComponentContentNotNullAndStarterDrawDataExists",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 133,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isDrawDataContainsObjects",
+ "args": [
+ {
+ "name": "drawData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 125,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "drawData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isStarterDrawDataExists",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 137,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isStudentDrawDataDifferentFromStarterData",
+ "args": [
+ {
+ "name": "drawDataString",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "starterDrawData",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 141,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "drawDataString",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "starterDrawData",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "removeBackgroundFromComponentState",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 101,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setUpTools",
+ "args": [
+ {
+ "name": "drawingToolId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "tools",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isDisabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 184,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "drawingToolId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "tools",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isDisabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "toggleToolVisibility",
+ "args": [
+ {
+ "name": "drawingTool",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isShowTool",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "title",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 192,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "drawingTool",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isShowTool",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "title",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "'use strict';\n\nimport $ from 'jquery';\nimport * as fabric from 'fabric';\nwindow['fabric'] = fabric.fabric;\nimport * as EventEmitter2 from 'eventemitter2';\nwindow['EventEmitter2'] = EventEmitter2;\nimport DrawingTool from '@wise-community/drawing-tool/dist/drawing-tool';\nimport { ComponentService } from '../componentService';\nimport { StudentAssetService } from '../../services/studentAssetService';\nimport { Injectable } from '@angular/core';\nimport { convertToPNGFile } from '../../common/canvas/canvas';\n\n@Injectable()\nexport class DrawService extends ComponentService {\n toolFieldToLabel: any = {\n select: 'Select tool',\n line: 'Line tool (click and hold to show available line types)',\n shape: 'Basic shape tool (click and hold to show available shapes)',\n freeHand: 'Free hand drawing tool',\n text: 'Text tool (click and hold to show available font sizes)',\n stamp: 'Stamp tool (click and hold to show available categories)',\n strokeColor: 'Stroke color (click and hold to show available colors)',\n fillColor: 'Fill color (click and hold to show available colors)',\n clone: 'Clone tool',\n strokeWidth: 'Stroke width (click and hold to show available options)',\n sendBack: 'Send selected objects to back',\n sendForward: 'Send selected objects to front',\n undo: 'Undo',\n redo: 'Redo',\n delete: 'Delete selected objects'\n };\n\n constructor(private StudentAssetService: StudentAssetService) {\n super();\n }\n\n getComponentTypeLabel(): string {\n return $localize`Draw`;\n }\n\n createComponent() {\n const component: any = super.createComponent();\n component.type = 'Draw';\n component.stamps = {\n Stamps: []\n };\n component.tools = {\n select: true,\n line: true,\n shape: true,\n freeHand: true,\n text: true,\n stamp: true,\n strokeColor: true,\n fillColor: true,\n clone: true,\n strokeWidth: true,\n sendBack: true,\n sendForward: true,\n undo: true,\n redo: true,\n delete: true\n };\n return component;\n }\n\n getDrawingToolId(domIdEnding: string): string {\n return this.getElementId('drawing-tool', domIdEnding);\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any) {\n if (componentStates != null && componentStates.length > 0) {\n if (this.isSubmitRequired(node, component)) {\n return this.hasComponentStateWithIsSubmitTrue(componentStates);\n } else {\n return this.hasComponentStateWithDrawData(componentStates);\n }\n }\n return false;\n }\n\n hasComponentStateWithIsSubmitTrue(componentStates: any[]) {\n for (let c = componentStates.length - 1; c >= 0; c--) {\n if (componentStates[c].isSubmit) {\n return true;\n }\n }\n return false;\n }\n\n hasComponentStateWithDrawData(componentStates: any[]) {\n for (let c = componentStates.length - 1; c >= 0; c--) {\n if (componentStates[c].studentData.drawData != null) {\n return true;\n }\n }\n return false;\n }\n\n removeBackgroundFromComponentState(componentState: any) {\n const drawData = componentState.studentData.drawData;\n const drawDataObject = JSON.parse(drawData);\n const canvas = drawDataObject.canvas;\n delete canvas.backgroundImage;\n const drawDataJSONString = JSON.stringify(drawDataObject);\n componentState.studentData.drawData = drawDataJSONString;\n return componentState;\n }\n\n componentStateHasStudentWork(componentState: any, componentContent: any) {\n if (componentState != null) {\n const drawDataString = componentState.studentData.drawData;\n const drawData = JSON.parse(drawDataString);\n if (this.isComponentContentNotNullAndStarterDrawDataExists(componentContent)) {\n const starterDrawData = componentContent.starterDrawData;\n return this.isStudentDrawDataDifferentFromStarterData(drawDataString, starterDrawData);\n } else if (this.isDrawDataContainsObjects(drawData)) {\n return true;\n }\n }\n return false;\n }\n\n isDrawDataContainsObjects(drawData: any) {\n return (\n drawData.canvas != null &&\n drawData.canvas.objects != null &&\n drawData.canvas.objects.length > 0\n );\n }\n\n isComponentContentNotNullAndStarterDrawDataExists(componentContent: any) {\n return componentContent != null && this.isStarterDrawDataExists(componentContent);\n }\n\n isStarterDrawDataExists(componentContent: any) {\n return componentContent.starterDrawData != null && componentContent.starterDrawData !== '';\n }\n\n isStudentDrawDataDifferentFromStarterData(drawDataString: string, starterDrawData: string) {\n return drawDataString != null && drawDataString !== '' && drawDataString !== starterDrawData;\n }\n\n /**\n * The component state has been rendered in a element\n * and now we want to take a snapshot of the work.\n * @param componentState The component state that has been rendered.\n * @return A promise that will return an image object.\n */\n generateImageFromRenderedComponentState(componentState: any) {\n return new Promise((resolve, reject) => {\n const domIdEnding = this.getDomIdEnding(\n componentState.nodeId,\n componentState.componentId,\n componentState\n );\n const canvas = this.getDrawingToolCanvas(this.getDrawingToolId(domIdEnding));\n const pngFile = convertToPNGFile(canvas);\n this.StudentAssetService.uploadAsset(pngFile).then((asset) => {\n resolve(asset);\n });\n });\n }\n\n getDrawingToolCanvas(drawingToolId: string): any {\n return document.querySelector(`#${drawingToolId} canvas`);\n }\n\n initializeDrawingTool(\n drawingToolId: string,\n stamps: any = {},\n width: number = 800,\n height: number = 600\n ): any {\n return new DrawingTool(`#${drawingToolId}`, {\n stamps: stamps,\n parseSVG: true,\n width: width,\n height: height\n });\n }\n\n setUpTools(drawingToolId: string, tools: any, isDisabled: boolean): void {\n const drawingTool = $(`#${drawingToolId}`);\n for (const toolName of Object.keys(tools)) {\n const isShowTool = tools[toolName];\n this.toggleToolVisibility(drawingTool, isShowTool, this.toolFieldToLabel[toolName]);\n }\n }\n\n toggleToolVisibility(drawingTool: any, isShowTool: boolean, title: string): void {\n if (isShowTool) {\n drawingTool.find(`[title=\"${title}\"]`).show();\n } else {\n drawingTool.find(`[title=\"${title}\"]`).hide();\n }\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "StudentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 32,
+ "jsdoctags": [
+ {
+ "name": "StudentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "EditBranchService",
+ "id": "injectable-EditBranchService-467c154b5b91a0d0724fd33ef03b8594a4df04c2d80f5362849266e9e357cfc44f9caf33dbfb5061b06b3b39b9f7c2069f04ba6ec64fbfc21343b5f5565b67e8",
+ "file": "src/assets/wise5/services/editBranchService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "addBranchPath",
+ "args": [
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 39,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "addNewNodeIdBeforeMergeStep",
+ "args": [
+ {
+ "name": "mergeStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "newNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 49,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "mergeStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "newNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createNewPaths",
+ "args": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 31,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "editBranch",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 22,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "removePaths",
+ "args": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 54,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "branchPaths",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateTransition",
+ "args": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "transition",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "index",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 77,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "transition",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "index",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateTransitionLogic",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateTransitions",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 71,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "addTransitionFromBranchNodeToPathNode",
+ "args": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "newNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 47,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "newNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "AuthorBranchService"
+ }
+ },
+ {
+ "name": "createPathStep",
+ "args": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 17,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "params",
+ "type": "AuthorBranchParams",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "pathIndex",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "AuthorBranchService"
+ }
+ },
+ {
+ "name": "setBranchNodeTransitionLogic",
+ "args": [
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "criteria",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 40,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "branchNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "criteria",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "AuthorBranchService"
+ }
+ },
+ {
+ "name": "setPathStepTransitions",
+ "args": [
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "mergeStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "newNodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "mergeStepId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "AuthorBranchService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { AuthorBranchService } from './authorBranchService';\nimport { AuthorBranchParams } from '../common/AuthorBranchParams';\nimport { TeacherProjectService } from './teacherProjectService';\nimport { DeleteBranchService } from './deleteBranchService';\nimport {\n CHOICE_CHOSEN_VALUE,\n RANDOM_VALUE,\n SCORE_VALUE,\n WORKGROUP_ID_VALUE\n} from '../../../app/domain/branchCriteria';\n\n@Injectable()\nexport class EditBranchService extends AuthorBranchService {\n constructor(\n private deleteBranchService: DeleteBranchService,\n protected projectService: TeacherProjectService\n ) {\n super(projectService);\n }\n\n editBranch(node: any, branchPaths: any[], params: AuthorBranchParams): Promise {\n this.projectService.parseProject();\n this.createNewPaths(branchPaths, params);\n this.removePaths(branchPaths, params);\n this.updateTransitions(node, params);\n this.updateTransitionLogic(node, params);\n return this.projectService.saveProject();\n }\n\n private createNewPaths(branchPaths: any[], params: AuthorBranchParams): void {\n branchPaths.forEach((path: any, index: number) => {\n if (path.new) {\n this.addBranchPath(index, params);\n }\n });\n }\n\n addBranchPath(pathIndex: number, params: AuthorBranchParams): void {\n const branchStep = this.projectService.getNode(params.branchStepId);\n const mergeStep = this.projectService.getNode(params.mergeStepId);\n const newNodeId = this.projectService.getNextAvailableNodeId();\n this.createPathStep(params, branchStep, newNodeId, pathIndex);\n this.setPathStepTransitions([newNodeId], mergeStep.id);\n this.setBranchNodeTransitionLogic(branchStep, params.criteria);\n this.addNewNodeIdBeforeMergeStep(params.mergeStepId, newNodeId);\n }\n\n private addNewNodeIdBeforeMergeStep(mergeStepId: string, newNodeId: string): void {\n const parentGroup = this.projectService.getParentGroup(mergeStepId);\n parentGroup.ids.splice(parentGroup.ids.indexOf(mergeStepId), 0, newNodeId);\n }\n\n private removePaths(branchPaths: any[], params: AuthorBranchParams): void {\n const nodeIdAfterMergeStep = this.projectService.getNodeIdAfter(params.mergeStepId);\n let nodeIdToPlaceAfter = params.mergeStepId;\n branchPaths\n .filter((path: any) => path.delete)\n .forEach((path: any) => {\n this.deleteBranchService.deleteBranchPathAndPlaceAfter(\n branchPaths,\n path,\n params.branchStepId,\n nodeIdToPlaceAfter,\n nodeIdAfterMergeStep\n );\n nodeIdToPlaceAfter = path.nodesInBranchPath[path.nodesInBranchPath.length - 1].nodeId;\n });\n }\n\n private updateTransitions(node: any, params: AuthorBranchParams): void {\n for (let i = 0; i < node.transitionLogic.transitions.length; i++) {\n this.updateTransition(params, node.transitionLogic.transitions[i], i);\n }\n }\n\n private updateTransition(params: AuthorBranchParams, transition: any, index: number): void {\n if (params.criteria === SCORE_VALUE) {\n transition.criteria = [\n {\n name: SCORE_VALUE,\n params: {\n componentId: params.componentId,\n nodeId: params.nodeId,\n scores: params.paths[index].split(',')\n }\n }\n ];\n } else if (params.criteria === CHOICE_CHOSEN_VALUE) {\n transition.criteria = [\n {\n name: CHOICE_CHOSEN_VALUE,\n params: {\n choiceIds: [params.paths[index]],\n componentId: params.componentId,\n nodeId: params.nodeId\n }\n }\n ];\n } else {\n delete transition.criteria;\n }\n }\n\n private updateTransitionLogic(node: any, params: AuthorBranchParams): void {\n if (params.criteria === WORKGROUP_ID_VALUE || params.criteria === RANDOM_VALUE) {\n node.transitionLogic.howToChooseAmongAvailablePaths = params.criteria;\n node.transitionLogic.whenToChoosePath = 'enterNode';\n } else {\n node.transitionLogic.howToChooseAmongAvailablePaths = RANDOM_VALUE;\n node.transitionLogic.whenToChoosePath =\n params.branchStepId === params.nodeId ? 'studentDataChanged' : 'enterNode';\n }\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "deleteBranchService",
+ "type": "DeleteBranchService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 14,
+ "jsdoctags": [
+ {
+ "name": "deleteBranchService",
+ "type": "DeleteBranchService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [
+ "AuthorBranchService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "EditTranslationsService",
+ "id": "injectable-EditTranslationsService-66101b39b29ab46579e073a3a4f7bb50ede2e2e1f0418dbacca2d435bd78d47883908514e9d22303d1c8f338beee04bb2ab715f06930181943081aa93dcd0e88",
+ "file": "src/assets/wise5/services/editProjectTranslationsService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "fetchAllTranslations",
+ "args": [],
+ "optional": false,
+ "returnType": "Promise>",
+ "typeParameters": [],
+ "line": 20,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124,
+ 134
+ ]
+ },
+ {
+ "name": "getI18NKey",
+ "args": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "key",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 50,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "key",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getI18NKeys",
+ "args": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 36,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentElement",
+ "type": "object",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getSaveTranslationRequest",
+ "args": [
+ {
+ "name": "translations",
+ "type": "Translations",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "language",
+ "type": "Language",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 54,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "translations",
+ "type": "Translations",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "language",
+ "type": "Language",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "fetchTranslations",
+ "args": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 16,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 124
+ ],
+ "jsdoctags": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ProjectTranslationService"
+ }
+ },
+ {
+ "name": "getTranslationMappingURL",
+ "args": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 24,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "locale",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ProjectTranslationService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { HttpClient } from '@angular/common/http';\nimport { ConfigService } from './configService';\nimport { ProjectTranslationService } from './projectTranslationService';\nimport { TeacherProjectService } from './teacherProjectService';\nimport { lastValueFrom, Observable } from 'rxjs';\nimport { Translations } from '../../../app/domain/translations';\nimport { Language } from '../../../app/domain/language';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class EditTranslationsService extends ProjectTranslationService {\n constructor(\n protected configService: ConfigService,\n protected http: HttpClient,\n protected projectService: TeacherProjectService\n ) {\n super(configService, http, projectService);\n }\n\n protected async fetchAllTranslations(): Promise> {\n const allTranslations = new Map();\n await Promise.all(\n this.projectService\n .getLocale()\n .getSupportedLanguages()\n .map(async (language) => {\n allTranslations.set(\n language,\n await lastValueFrom(this.fetchTranslations(language.locale))\n );\n })\n );\n return allTranslations;\n }\n\n protected getI18NKeys(componentElement: object): any[] {\n let i18nKeys = Object.keys(componentElement)\n .filter((key) => key.endsWith('.i18n'))\n .map((key) => this.getI18NKey(componentElement, key));\n Object.values(componentElement).forEach((value) => {\n if (Array.isArray(value)) {\n i18nKeys = i18nKeys.concat(...value.map((val) => this.getI18NKeys(val)));\n } else if (typeof value === 'object' && value != null) {\n i18nKeys = i18nKeys.concat(this.getI18NKeys(value));\n }\n });\n return i18nKeys;\n }\n\n protected getI18NKey(componentElement: object, key: string): any {\n return componentElement[key].id;\n }\n\n protected getSaveTranslationRequest(\n translations: Translations,\n language: Language\n ): Observable {\n return this.http.post(\n `/api/author/project/translate/${this.configService.getProjectId()}/${language.locale}`,\n translations\n );\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 11,
+ "jsdoctags": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [
+ "ProjectTranslationService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "EmbeddedService",
+ "id": "injectable-EmbeddedService-676867b65091ec0c3731a96beb399f579254e77f2209c5d7edb90e66a27029a8762ce896c1c2dd31148b61133e253f78213c5d7deff9ce6d431f4c7efeb0f383",
+ "file": "src/assets/wise5/components/embedded/embeddedService.ts",
+ "properties": [
+ {
+ "name": "defaultHeight",
+ "defaultValue": "'600px'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15
+ },
+ {
+ "name": "defaultWidth",
+ "defaultValue": "'100%'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14
+ },
+ {
+ "name": "iframePrefix",
+ "defaultValue": "'embedded-application-iframe-'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16
+ },
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 73,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 77,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 33,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createLatestStudentWorkMessage",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 137,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createProjectPathMessage",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 144,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "generateImageFromRenderedComponentState",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 87,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nThe component state has been rendered in a element\nand now we want to take a snapshot of the work.\n",
+ "description": "The component state has been rendered in a element\nand now we want to take a snapshot of the work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2476,
+ "end": 2490,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2470,
+ "end": 2475,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The component state that has been rendered.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2541,
+ "end": 2547,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "A promise that will return an image object.
\n"
+ }
+ ]
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 29,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getEmbeddedApplicationIframeId",
+ "args": [
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 25,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getModelElement",
+ "args": [
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 99,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "handleGetParametersMessage",
+ "args": [
+ {
+ "name": "iframeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 118,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "iframeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasComponentStateWithIsCompletedField",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 53,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasComponentStateWithIsCompletedTrue",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 63,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 41,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendMessageToApplication",
+ "args": [
+ {
+ "name": "iframeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "message",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 111,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "iframeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "message",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "'use strict';\n\nimport $ from 'jquery';\nimport html2canvas from 'html2canvas';\nimport { ComponentService } from '../componentService';\nimport { StudentAssetService } from '../../services/studentAssetService';\nimport { Injectable } from '@angular/core';\nimport { ConfigService } from '../../services/configService';\nimport { copy } from '../../common/object/object';\nimport { convertToPNGFile } from '../../common/canvas/canvas';\n\n@Injectable()\nexport class EmbeddedService extends ComponentService {\n defaultWidth: string = '100%';\n defaultHeight: string = '600px';\n iframePrefix: string = 'embedded-application-iframe-';\n\n constructor(\n protected ConfigService: ConfigService,\n protected StudentAssetService: StudentAssetService\n ) {\n super();\n }\n\n getEmbeddedApplicationIframeId(componentId: string): string {\n return `${this.iframePrefix}-${componentId}`;\n }\n\n getComponentTypeLabel(): string {\n return $localize`Embedded (Custom)`;\n }\n\n createComponent() {\n const component: any = super.createComponent();\n component.type = 'Embedded';\n component.url = '';\n component.height = 600;\n return component;\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any) {\n if (componentStates != null) {\n if (\n this.hasComponentStateWithIsCompletedField(componentStates) &&\n this.hasComponentStateWithIsCompletedTrue(componentStates)\n ) {\n return true;\n }\n }\n return this.hasNodeEnteredEvent(nodeEvents);\n }\n\n hasComponentStateWithIsCompletedField(componentStates: any[]) {\n for (const componentState of componentStates) {\n const studentData = componentState.studentData;\n if (studentData != null && studentData.isCompleted != null) {\n return true;\n }\n }\n return false;\n }\n\n hasComponentStateWithIsCompletedTrue(componentStates: any[]) {\n for (const componentState of componentStates) {\n const studentData = componentState.studentData;\n if (studentData != null && studentData.isCompleted === true) {\n return true;\n }\n }\n return false;\n }\n\n componentHasWork(component: any): boolean {\n return component.hasWork;\n }\n\n componentStateHasStudentWork(componentState: any, componentContent: any) {\n return componentState.studentData != null;\n }\n\n /**\n * The component state has been rendered in a element\n * and now we want to take a snapshot of the work.\n * @param componentState The component state that has been rendered.\n * @return A promise that will return an image object.\n */\n generateImageFromRenderedComponentState(componentState: any) {\n const modelElement = this.getModelElement(componentState.componentId);\n return new Promise((resolve, reject) => {\n html2canvas(modelElement as HTMLElement).then((canvas) => {\n const pngFile = convertToPNGFile(canvas);\n this.StudentAssetService.uploadAsset(pngFile).then((asset) => {\n resolve(asset);\n });\n });\n });\n }\n\n getModelElement(componentId: string) {\n const iframeId = this.getEmbeddedApplicationIframeId(componentId);\n const iframe = $(`#${iframeId}`);\n if (iframe != null && iframe.length > 0) {\n const modelElement: any = iframe.contents().find('html');\n if (modelElement != null && modelElement.length > 0) {\n return modelElement[0];\n }\n }\n return null;\n }\n\n sendMessageToApplication(iframeId: string, message: any): void {\n (window.document.getElementById(iframeId) as HTMLIFrameElement).contentWindow.postMessage(\n message,\n '*'\n );\n }\n\n handleGetParametersMessage(\n iframeId: string,\n nodeId: string,\n componentId: string,\n componentContent: any\n ): void {\n let parameters: any = {};\n if (componentContent.parameters != null) {\n parameters = copy(componentContent.parameters);\n }\n parameters.nodeId = nodeId;\n parameters.componentId = componentId;\n const message = {\n messageType: 'parameters',\n parameters: parameters\n };\n this.sendMessageToApplication(iframeId, message);\n }\n\n createLatestStudentWorkMessage(componentState: any): any {\n return {\n messageType: 'latestStudentWork',\n latestStudentWork: componentState\n };\n }\n\n createProjectPathMessage(): any {\n return {\n messageType: 'projectPath',\n projectPath: this.ConfigService.getConfigParam('projectBaseURL'),\n projectAssetsPath: this.ConfigService.getConfigParam('projectBaseURL') + 'assets'\n };\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "StudentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 16,
+ "jsdoctags": [
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "StudentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "GenerateImageService",
+ "id": "injectable-GenerateImageService-bf249c9b4f7f3f16959df57b7a43801504bba9c17ea60385e8dd0646eba440cddc1ea72bdb30464f61f2b8ebc7fb94a107d47e3ae9f138023e1b172f0dc31e9e",
+ "file": "src/assets/wise5/services/generateImageService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "generateImageFromComponentState",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 19,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { StudentDataService } from './studentDataService';\nimport { MatDialog } from '@angular/material/dialog';\nimport { GenerateImageDialogComponent } from '../directives/generate-image-dialog/generate-image-dialog.component';\n\n@Injectable({ providedIn: 'root' })\nexport class GenerateImageService {\n constructor(\n private dataService: StudentDataService,\n private dialog: MatDialog\n ) {\n this.dataService.generateImageRequest$.subscribe((componentState) => {\n this.generateImageFromComponentState(componentState).then((image) => {\n this.dataService.generateImageResponse(image);\n });\n });\n }\n\n generateImageFromComponentState(componentState: any): any {\n const dialogRef = this.dialog.open(GenerateImageDialogComponent, {\n data: componentState\n });\n return new Promise((resolve, reject) => {\n dialogRef.afterClosed().subscribe((result) => {\n resolve(result);\n });\n });\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "dataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "dialog",
+ "type": "MatDialog",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 7,
+ "jsdoctags": [
+ {
+ "name": "dataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "dialog",
+ "type": "MatDialog",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "GetWorkgroupService",
+ "id": "injectable-GetWorkgroupService-4918f0618a6131621755c47fde68ccb06a9172d489655e017e9e730b013f026285ff17baf7da7cc763924ce1956a6d1f054272650a3d4dbace8e51f043a82b91",
+ "file": "src/app/services/getWorkgroupService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "getAllWorkgroupsInPeriod",
+ "args": [
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 9,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { ConfigService } from '../../assets/wise5/services/configService';\n\n@Injectable()\nexport class GetWorkgroupService {\n constructor(private ConfigService: ConfigService, private http: HttpClient) {}\n\n getAllWorkgroupsInPeriod(periodId: number) {\n return this.http.get(\n `/api/teacher/run/${this.ConfigService.getRunId()}/period/${periodId}/workgroups`\n );\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 6,
+ "jsdoctags": [
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "GradingNodeService",
+ "id": "injectable-GradingNodeService-6a9cac1ab2da654ccebbf3de9fcb2fdfe7d36a9b9856dedf8807ac627b3c5f6beeb3a0fdb25f1ac2110a2c256a56baed13cba6d61f0179093beb9beb365599b9",
+ "file": "src/assets/wise5/services/gradingNodeService.ts",
+ "properties": [
+ {
+ "name": "componentShowSubmitButtonValueChanged$",
+ "defaultValue": "this.componentShowSubmitButtonValueChangedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "TeacherNodeService"
+ }
+ },
+ {
+ "name": "componentShowSubmitButtonValueChangedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "TeacherNodeService"
+ }
+ },
+ {
+ "name": "deleteStarterState$",
+ "defaultValue": "this.deleteStarterStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "TeacherNodeService"
+ }
+ },
+ {
+ "name": "deleteStarterStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "TeacherNodeService"
+ }
+ },
+ {
+ "name": "starterStateResponse$",
+ "defaultValue": "this.starterStateResponseSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 17,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "TeacherNodeService"
+ }
+ },
+ {
+ "name": "starterStateResponseSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "TeacherNodeService"
+ }
+ },
+ {
+ "name": "doneRenderingComponent$",
+ "defaultValue": "this.doneRenderingComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "NodeService"
+ }
+ },
+ {
+ "name": "doneRenderingComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "NodeService"
+ }
+ },
+ {
+ "name": "nodeSubmitClicked$",
+ "defaultValue": "this.nodeSubmitClickedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "NodeService"
+ }
+ },
+ {
+ "name": "nodeSubmitClickedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "NodeService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "getNextNodeId",
+ "args": [
+ {
+ "name": "currentId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 6,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "currentId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "NodeService"
+ }
+ },
+ {
+ "name": "getPrevNodeId",
+ "args": [
+ {
+ "name": "currentId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 15,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "currentId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "NodeService"
+ }
+ },
+ {
+ "name": "broadcastComponentShowSubmitButtonValueChanged",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 28,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "TeacherNodeService"
+ }
+ },
+ {
+ "name": "deleteStarterState",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "TeacherNodeService"
+ }
+ },
+ {
+ "name": "respondStarterState",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 36,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "TeacherNodeService"
+ }
+ },
+ {
+ "name": "broadcastDoneRenderingComponent",
+ "args": [
+ {
+ "name": "nodeIdAndComponentId",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 55,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeIdAndComponentId",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "NodeService"
+ }
+ },
+ {
+ "name": "broadcastNodeSubmitClicked",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 51,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "NodeService"
+ }
+ },
+ {
+ "name": "closeNode",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 43,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "NodeService"
+ }
+ },
+ {
+ "name": "goToNextNode",
+ "args": [],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "NodeService"
+ }
+ },
+ {
+ "name": "goToPrevNode",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 37,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "NodeService"
+ }
+ },
+ {
+ "name": "setCurrentNode",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 22,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "NodeService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { TeacherNodeService } from './teacherNodeService';\n\n@Injectable()\nexport class GradingNodeService extends TeacherNodeService {\n getNextNodeId(currentId = null): Promise {\n return super.getNextNodeId(currentId).then((nextNodeId: string) => {\n if (!nextNodeId) return null;\n return this.projectService.nodeHasWork(nextNodeId)\n ? nextNodeId\n : this.getNextNodeId(nextNodeId);\n });\n }\n\n getPrevNodeId(currentId = null) {\n const prevNodeId = super.getPrevNodeId(currentId);\n if (!prevNodeId) return null;\n return this.projectService.nodeHasWork(prevNodeId)\n ? prevNodeId\n : this.getPrevNodeId(prevNodeId);\n }\n}\n",
+ "extends": [
+ "TeacherNodeService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "GraphService",
+ "id": "injectable-GraphService-4cd119a8b40e175f00206ef0d1fcfb5a6f65a862a3ae1e43b7abb3b5924bbb2e33896a6b09cc176e8043000bc622828556b834ee0693a42602c18aa39f158de3",
+ "file": "src/assets/wise5/components/graph/graphService.ts",
+ "properties": [
+ {
+ "name": "seriesColors",
+ "defaultValue": "['blue', 'red', 'green', 'orange', 'purple', 'black']",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14
+ },
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "anySeriesHasDataPoint",
+ "args": [
+ {
+ "name": "multipleSeries",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 276,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if an array of series has any data point\n",
+ "description": "Check if an array of series has any data point
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 7667,
+ "end": 7681,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "multipleSeries"
+ },
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 7661,
+ "end": 7666,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an array of series
\n"
+ },
+ {
+ "tagName": {
+ "pos": 7707,
+ "end": 7713,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether any of the series has a data point
\n"
+ }
+ ]
+ },
+ {
+ "name": "anyTrialHasDataPoint",
+ "args": [
+ {
+ "name": "trials",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 248,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if any of the trials contains a data point\n",
+ "description": "Check if any of the trials contains a data point
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 6968,
+ "end": 6974,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "trials"
+ },
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 6962,
+ "end": 6967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an array of trials
\n"
+ },
+ {
+ "tagName": {
+ "pos": 7000,
+ "end": 7006,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether any of the trials contains a data point
\n"
+ }
+ ]
+ },
+ {
+ "name": "canEdit",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 130,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nDetermine if the student can perform any work on this component.\n",
+ "description": "Determine if the student can perform any work on this component.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3495,
+ "end": 3504,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3489,
+ "end": 3494,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The component content.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3534,
+ "end": 3540,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "Whether the student can perform any work on this component.
\n"
+ }
+ ]
+ },
+ {
+ "name": "combineSeriesNameXTextYText",
+ "args": [
+ {
+ "name": "seriesName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "xText",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "yText",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 438,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "seriesName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "xText",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "yText",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 167,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate a Graph component object\n",
+ "description": "Create a Graph component object
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 909,
+ "end": 916,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "a new Graph component object
\n"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createTooltipFormatter",
+ "args": [
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "yAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 322,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "yAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "generateImageFromRenderedComponentState",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 302,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nThe component state has been rendered in a element\nand now we want to take a snapshot of the work.\n",
+ "description": "The component state has been rendered in a element\nand now we want to take a snapshot of the work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 8411,
+ "end": 8425,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 8405,
+ "end": 8410,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The component state that has been rendered.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 8476,
+ "end": 8482,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "A promise that will return an image object.
\n"
+ }
+ ]
+ },
+ {
+ "name": "getAxisTextForLimitGraph",
+ "args": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "num",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "axisName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "axisObj",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 392,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "num",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "axisName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "axisObj",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAxisTitle",
+ "args": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "axisObj",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 405,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "axisObj",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAxisUnits",
+ "args": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "axisName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "axisObj",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 536,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "axisName",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "axisObj",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getBoldText",
+ "args": [
+ {
+ "name": "text",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 388,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "text",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCategoriesAxisTypeTooltip",
+ "args": [
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "yAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 452,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "yAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCategoryByIndex",
+ "args": [
+ {
+ "name": "index",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 495,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "index",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getClassmateStudentWork",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "showWorkNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "showWorkComponentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "showClassmateWorkSource",
+ "type": "\"period\" | \"class\"",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 574,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "showWorkNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "showWorkComponentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "showClassmateWorkSource",
+ "type": "\"period\" | \"class\"",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 24,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getHighchartsDiv",
+ "args": [
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 314,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getLimitAxisTypeTooltip",
+ "args": [
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "yAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 358,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "yAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getPlotBandsFromTrials",
+ "args": [
+ {
+ "name": "trials",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 554,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "trials",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getPointDisplay",
+ "args": [
+ {
+ "name": "label",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "value",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "units",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 434,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "label",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "value",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "units",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getSeriesColor",
+ "args": [
+ {
+ "name": "index",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 318,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "index",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getSeriesFromTrials",
+ "args": [
+ {
+ "name": "trials",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 564,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "trials",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getTooltipHeader",
+ "args": [
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "yAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 371,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "yAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getValueForLimitGraph",
+ "args": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "num",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 422,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "num",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getXTextForCategoriesGraph",
+ "args": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "x",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 471,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "x",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getXValueForCategoriesGraph",
+ "args": [
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "x",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 484,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "x",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getYTextForCategoriesGraph",
+ "args": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "y",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "axis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 502,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "series",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "y",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "axis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasCompletedComponentState",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 100,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasComponentStates",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 112,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasSeriesData",
+ "args": [
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 140,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasSubmitComponentState",
+ "args": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 116,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasTrialData",
+ "args": [
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 152,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCategoriesXAxisType",
+ "args": [
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 354,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 92,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isLimitXAxisType",
+ "args": [
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 350,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "xAxis",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isStudentChangedAxisLimit",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 207,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the student has changed any of the axis limits\n",
+ "description": "Check if the student has changed any of the axis limits
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 5594,
+ "end": 5608,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5588,
+ "end": 5593,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "name": {
+ "pos": 5641,
+ "end": 5657,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5635,
+ "end": 5640,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "tagName": {
+ "pos": 5686,
+ "end": 5692,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the student has changed any of the axis limits
\n"
+ }
+ ]
+ },
+ {
+ "name": "isStudentDataHasWork",
+ "args": [
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 180,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "studentData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isXAxisChanged",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 219,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isYAxisChanged",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 231,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "performRounding",
+ "args": [
+ {
+ "name": "number",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 509,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "number",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "roundValuesTo",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "pointHasCustomTooltip",
+ "args": [
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 550,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "point",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "roundToNearest",
+ "args": [
+ {
+ "name": "x",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "divisor",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 532,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "x",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "divisor",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "roundToNearestHundredth",
+ "args": [
+ {
+ "name": "x",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 528,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "x",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "roundToNearestInteger",
+ "args": [
+ {
+ "name": "x",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 520,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "x",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "roundToNearestTenth",
+ "args": [
+ {
+ "name": "x",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 524,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "x",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "seriesHasDataPoint",
+ "args": [
+ {
+ "name": "singleSeries",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 292,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if a series has a data point\n",
+ "description": "Check if a series has a data point
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 8078,
+ "end": 8090,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "singleSeries"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 8072,
+ "end": 8077,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "a series object
\n"
+ },
+ {
+ "tagName": {
+ "pos": 8113,
+ "end": 8119,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the series object has any data points
\n"
+ }
+ ]
+ },
+ {
+ "name": "trialHasDataPoint",
+ "args": [
+ {
+ "name": "trial",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 262,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if a trial has a data point\n",
+ "description": "Check if a trial has a data point
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 7293,
+ "end": 7298,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "trial"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 7287,
+ "end": 7292,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "a trial object which can contain multiple series
\n"
+ },
+ {
+ "tagName": {
+ "pos": 7354,
+ "end": 7360,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the trial contains a data point
\n"
+ }
+ ]
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "'use strict';\n\nimport html2canvas from 'html2canvas';\nimport { Injectable } from '@angular/core';\nimport { ComponentService } from '../componentService';\nimport { StudentAssetService } from '../../services/studentAssetService';\nimport { ConfigService } from '../../services/configService';\nimport { HttpClient } from '@angular/common/http';\nimport { convertToPNGFile } from '../../common/canvas/canvas';\nimport { hasConnectedComponent } from '../../common/ComponentContent';\n\n@Injectable()\nexport class GraphService extends ComponentService {\n seriesColors: string[] = ['blue', 'red', 'green', 'orange', 'purple', 'black'];\n\n constructor(\n private configService: ConfigService,\n private http: HttpClient,\n private StudentAssetService: StudentAssetService\n ) {\n super();\n }\n\n getComponentTypeLabel(): string {\n return $localize`Graph`;\n }\n\n /**\n * Create a Graph component object\n * @returns a new Graph component object\n */\n createComponent() {\n const component: any = super.createComponent();\n component.type = 'Graph';\n component.title = '';\n component.width = 800;\n component.height = 500;\n component.enableTrials = false;\n component.canCreateNewTrials = false;\n component.canDeleteTrials = false;\n component.hideAllTrialsOnNewTrial = false;\n component.canStudentHideSeriesOnLegendClick = false;\n component.roundValuesTo = 'integer';\n component.graphType = 'line';\n component.xAxis = {\n title: {\n text: $localize`Time (seconds)`,\n useHTML: true\n },\n min: 0,\n max: 100,\n units: $localize`s`,\n locked: true,\n type: 'limits',\n allowDecimals: false\n };\n component.yAxis = {\n title: {\n text: $localize`Position (meters)`,\n useHTML: true,\n style: {\n color: null\n }\n },\n labels: {\n style: {\n color: null\n }\n },\n min: 0,\n max: 100,\n units: $localize`m`,\n locked: true,\n allowDecimals: false\n };\n component.series = [\n {\n name: $localize`Prediction`,\n data: [],\n color: 'blue',\n dashStyle: 'Solid',\n marker: {\n symbol: 'circle'\n },\n canEdit: true,\n type: 'line'\n }\n ];\n return component;\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any) {\n if (this.canEdit(component)) {\n return this.hasCompletedComponentState(componentStates, node, component);\n } else {\n return this.hasNodeEnteredEvent(nodeEvents);\n }\n }\n\n hasCompletedComponentState(componentStates: any[], node: any, component: any) {\n if (this.hasComponentStates(componentStates)) {\n if (this.isSubmitRequired(node, component)) {\n return this.hasSubmitComponentState(componentStates);\n } else {\n const latestComponentState = componentStates[componentStates.length - 1];\n return this.componentStateHasStudentWork(latestComponentState);\n }\n }\n return false;\n }\n\n hasComponentStates(componentStates: any[]) {\n return componentStates != null && componentStates.length > 0;\n }\n\n hasSubmitComponentState(componentStates: any[]) {\n for (const componentState of componentStates) {\n if (componentState.isSubmit && this.componentStateHasStudentWork(componentState)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Determine if the student can perform any work on this component.\n * @param component The component content.\n * @return Whether the student can perform any work on this component.\n */\n canEdit(component: any): boolean {\n const series = component.series;\n for (const singleSeries of series) {\n if (singleSeries.canEdit) {\n return true;\n }\n }\n return hasConnectedComponent(component, 'importWork');\n }\n\n hasSeriesData(studentData: any) {\n const series = studentData.series;\n if (series != null) {\n for (const singleSeries of series) {\n if (singleSeries.data != null && singleSeries.data.length > 0) {\n return true;\n }\n }\n }\n return false;\n }\n\n hasTrialData(studentData: any) {\n const trials = studentData.trials;\n if (trials != null) {\n for (const trial of trials) {\n for (const singleSeries of trial.series) {\n const seriesData = singleSeries.data;\n if (seriesData.length > 0) {\n return true;\n }\n }\n }\n }\n return false;\n }\n\n componentStateHasStudentWork(componentState: any, componentContent: any = null) {\n if (componentState != null) {\n const studentData = componentState.studentData;\n if (studentData != null && this.isStudentDataHasWork(studentData)) {\n return true;\n }\n if (this.isStudentChangedAxisLimit(componentState, componentContent)) {\n return true;\n }\n }\n return false;\n }\n\n isStudentDataHasWork(studentData: any) {\n if (studentData.version == 1) {\n /*\n * this is the old graph student data format where the\n * student data can contain multiple series.\n */\n if (this.anySeriesHasDataPoint(studentData.series)) {\n return true;\n }\n } else {\n /*\n * this is the new graph student data format where the student data can contain multiple\n * trials and each trial can contain multiple series.\n */\n if (this.anyTrialHasDataPoint(studentData.trials)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Check if the student has changed any of the axis limits\n * @param componentState the component state\n * @param componentContent the component content\n * @return whether the student has changed any of the axis limits\n */\n isStudentChangedAxisLimit(componentState: any, componentContent: any) {\n if (componentState != null && componentState.studentData != null && componentContent != null) {\n if (\n this.isXAxisChanged(componentState, componentContent) ||\n this.isYAxisChanged(componentState, componentContent)\n ) {\n return true;\n }\n }\n return false;\n }\n\n isXAxisChanged(componentState: any, componentContent: any) {\n if (componentState.studentData.xAxis != null && componentContent.xAxis != null) {\n if (\n componentState.studentData.xAxis.min != componentContent.xAxis.min ||\n componentState.studentData.xAxis.max != componentContent.xAxis.max\n ) {\n return true;\n }\n }\n return false;\n }\n\n isYAxisChanged(componentState: any, componentContent: any) {\n if (componentState.studentData.yAxis != null && componentContent.yAxis != null) {\n if (\n componentState.studentData.yAxis.min != componentContent.yAxis.min ||\n componentState.studentData.yAxis.max != componentContent.yAxis.max\n ) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Check if any of the trials contains a data point\n * @param trials an array of trials\n * @return whether any of the trials contains a data point\n */\n anyTrialHasDataPoint(trials: any[]) {\n for (const trial of trials) {\n if (this.trialHasDataPoint(trial)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Check if a trial has a data point\n * @param trial a trial object which can contain multiple series\n * @return whether the trial contains a data point\n */\n trialHasDataPoint(trial: any) {\n for (const singleSeries of trial.series) {\n if (this.seriesHasDataPoint(singleSeries)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Check if an array of series has any data point\n * @param multipleSeries an array of series\n * @return whether any of the series has a data point\n */\n anySeriesHasDataPoint(multipleSeries: any[]) {\n if (multipleSeries != null) {\n for (const singleSeries of multipleSeries) {\n if (this.seriesHasDataPoint(singleSeries)) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * Check if a series has a data point\n * @param singleSeries a series object\n * @return whether the series object has any data points\n */\n seriesHasDataPoint(singleSeries: any) {\n return singleSeries.data.length > 0;\n }\n\n /**\n * The component state has been rendered in a element\n * and now we want to take a snapshot of the work.\n * @param componentState The component state that has been rendered.\n * @return A promise that will return an image object.\n */\n generateImageFromRenderedComponentState(componentState: any) {\n return new Promise((resolve, reject) => {\n const highchartsDiv = this.getHighchartsDiv(componentState.componentId);\n html2canvas(highchartsDiv as HTMLElement).then((canvas) => {\n const pngFile = convertToPNGFile(canvas);\n this.StudentAssetService.uploadAsset(pngFile).then((asset) => {\n resolve(asset);\n });\n });\n });\n }\n\n getHighchartsDiv(componentId: string) {\n return document.querySelector(`#chart_${componentId} .highcharts-container`);\n }\n\n getSeriesColor(index: number): string {\n return this.seriesColors[index];\n }\n\n createTooltipFormatter(xAxis: any, yAxis: any, roundValuesTo: string): any {\n const thisGraphService = this;\n return function () {\n let text = '';\n if (thisGraphService.isLimitXAxisType(xAxis)) {\n text = thisGraphService.getLimitAxisTypeTooltip(\n this,\n this.series,\n xAxis,\n yAxis,\n roundValuesTo\n );\n } else if (thisGraphService.isCategoriesXAxisType(xAxis)) {\n text = thisGraphService.getCategoriesAxisTypeTooltip(\n this,\n this.series,\n xAxis,\n yAxis,\n roundValuesTo\n );\n }\n if (thisGraphService.pointHasCustomTooltip(this.point)) {\n text += ' ' + this.point.tooltip;\n }\n return text;\n };\n }\n\n isLimitXAxisType(xAxis: any): boolean {\n return xAxis.type === 'limits' || xAxis.type == null;\n }\n\n isCategoriesXAxisType(xAxis: any): boolean {\n return xAxis.type === 'categories';\n }\n\n getLimitAxisTypeTooltip(\n point: any,\n series: any,\n xAxis: any,\n yAxis: any,\n roundValuesTo: string\n ): string {\n const tooltipHeader = this.getTooltipHeader(point, series, yAxis);\n const xText = this.getAxisTextForLimitGraph(series, point.x, 'xAxis', xAxis, roundValuesTo);\n const yText = this.getAxisTextForLimitGraph(series, point.y, 'yAxis', yAxis, roundValuesTo);\n return this.combineSeriesNameXTextYText(tooltipHeader, xText, yText);\n }\n\n getTooltipHeader(point: any, series: any, yAxis: any): string {\n let tooltipHeader = '';\n if (point.point.tooltipHeader) {\n tooltipHeader = point.point.tooltipHeader;\n } else {\n const yAxisLabel = this.getAxisTitle(series, yAxis);\n const seriesName = series.name;\n if (yAxisLabel !== seriesName) {\n tooltipHeader = seriesName;\n }\n }\n if (tooltipHeader !== '') {\n tooltipHeader = this.getBoldText(tooltipHeader);\n }\n return tooltipHeader;\n }\n\n getBoldText(text: string): string {\n return `${text} `;\n }\n\n getAxisTextForLimitGraph(\n series: any,\n num: number,\n axisName: string,\n axisObj: any,\n roundValuesTo: string\n ): string {\n const label = this.getAxisTitle(series, axisObj);\n const value = this.getValueForLimitGraph(series, num, roundValuesTo);\n const units = this.getAxisUnits(series, axisName, axisObj);\n return this.getPointDisplay(label, value, units);\n }\n\n getAxisTitle(series: any, axisObj: any): string {\n if (Array.isArray(axisObj)) {\n const axisIndex = series.options.yAxis == null ? series.index : series.options.yAxis;\n if (axisObj[axisIndex] != null) {\n if (axisObj[axisIndex].title.text == null || axisObj[axisIndex].title.text === '') {\n return series.name;\n } else {\n return axisObj[axisIndex].title.text;\n }\n }\n } else if (axisObj.title.text == null || axisObj.title.text === '') {\n return series.name;\n } else {\n return axisObj.title.text;\n }\n }\n\n getValueForLimitGraph(series: any, num: number, roundValuesTo: string): any {\n if (\n series.data[num] != null &&\n series.data[num].category === num &&\n series.data[num].name != null\n ) {\n return series.data[num].name;\n } else {\n return this.performRounding(num, roundValuesTo);\n }\n }\n\n getPointDisplay(label: string, value: any, units: string): string {\n return `${label}: ${value} ${units} `;\n }\n\n combineSeriesNameXTextYText(seriesName: string, xText: string, yText: string): string {\n let text = '';\n if (seriesName !== '') {\n text += seriesName + ' ';\n }\n if (xText !== '') {\n text += xText + ' ';\n }\n if (yText !== '') {\n text += yText + ' ';\n }\n return text;\n }\n\n getCategoriesAxisTypeTooltip(\n point: any,\n series: any,\n xAxis: any,\n yAxis: any,\n roundValuesTo: string\n ): string {\n const tooltipHeader = this.getTooltipHeader(point, series, yAxis);\n const xText = this.getXTextForCategoriesGraph(\n series,\n point.point,\n point.x,\n xAxis,\n roundValuesTo\n );\n const yText = this.getYTextForCategoriesGraph(series, point.y, yAxis, roundValuesTo);\n return this.combineSeriesNameXTextYText(tooltipHeader, xText, yText);\n }\n\n getXTextForCategoriesGraph(\n series: any,\n point: any,\n x: number,\n xAxis: any,\n roundValuesTo: string\n ): string {\n const label = xAxis.title.text;\n const value = this.getXValueForCategoriesGraph(point, x, xAxis, roundValuesTo);\n const units = this.getAxisUnits(series, xAxis.name, xAxis);\n return this.getPointDisplay(label, value, units);\n }\n\n getXValueForCategoriesGraph(point: any, x: number, xAxis: any, roundValuesTo: string): any {\n const category = this.getCategoryByIndex(point.index, xAxis);\n if (category != null) {\n return category;\n } else if (point.category === x && point.name != null) {\n return point.name;\n } else {\n return this.performRounding(x, roundValuesTo);\n }\n }\n\n getCategoryByIndex(index: number, xAxis: any): string {\n if (xAxis != null && xAxis.categories != null && index < xAxis.categories.length) {\n return xAxis.categories[index];\n }\n return null;\n }\n\n getYTextForCategoriesGraph(series: any, y: number, axis: any, roundValuesTo: string): string {\n const label = this.getAxisTitle(series, axis);\n const value = this.performRounding(y, roundValuesTo);\n const units = this.getAxisUnits(series, axis.name, axis);\n return this.getPointDisplay(label, value, units);\n }\n\n performRounding(number: number, roundValuesTo: string): number {\n if (roundValuesTo === 'integer') {\n number = this.roundToNearestInteger(number);\n } else if (roundValuesTo === 'tenth') {\n number = this.roundToNearestTenth(number);\n } else if (roundValuesTo === 'hundredth') {\n number = this.roundToNearestHundredth(number);\n }\n return number;\n }\n\n roundToNearestInteger(x): number {\n return Math.round(parseFloat(x));\n }\n\n roundToNearestTenth(x): number {\n return this.roundToNearest(x, 10);\n }\n\n roundToNearestHundredth(x): number {\n return this.roundToNearest(x, 100);\n }\n\n roundToNearest(x: any, divisor: number): number {\n return Math.round(parseFloat(x) * divisor) / divisor;\n }\n\n getAxisUnits(series: any, axisName: string, axisObj: any): string {\n if (\n series[axisName] != null &&\n series[axisName].userOptions != null &&\n series[axisName].userOptions.units != null\n ) {\n return series[axisName].userOptions.units;\n } else if (axisObj.units != null) {\n return axisObj.units;\n } else {\n return '';\n }\n }\n\n pointHasCustomTooltip(point: any): boolean {\n return point.tooltip != null && point.tooltip !== '';\n }\n\n getPlotBandsFromTrials(trials: any[]): any[] {\n let trialPlotBands = [];\n for (const trial of trials) {\n if (trial.show && trial.xAxis != null && trial.xAxis.plotBands != null) {\n trialPlotBands = trialPlotBands.concat(trial.xAxis.plotBands);\n }\n }\n return trialPlotBands;\n }\n\n getSeriesFromTrials(trials: any[]): any[] {\n let series = [];\n for (const trial of trials) {\n if (trial.show) {\n series = series.concat(trial.series);\n }\n }\n return series;\n }\n\n getClassmateStudentWork(\n nodeId: string,\n componentId: string,\n periodId: number,\n showWorkNodeId: string,\n showWorkComponentId: string,\n showClassmateWorkSource: 'period' | 'class'\n ) {\n const runId = this.configService.getRunId();\n if (showClassmateWorkSource === 'period') {\n return this.http.get(\n `/api/classmate/graph/student-work/${runId}/${nodeId}/${componentId}/${showWorkNodeId}/${showWorkComponentId}/period/${periodId}`\n );\n } else {\n return this.http.get(\n `/api/classmate/graph/student-work/${runId}/${nodeId}/${componentId}/${showWorkNodeId}/${showWorkComponentId}/class`\n );\n }\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "StudentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 14,
+ "jsdoctags": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "StudentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "HTMLService",
+ "id": "injectable-HTMLService-1f4ad34ef7e1a57d07dd2cea51d9cdee2c94b8edd47629da2345067bc559756db4812f612f96b3e02f0c642315a8e07f64cee25a0f40334f260b5c4e469fa964",
+ "file": "src/assets/wise5/components/html/htmlService.ts",
+ "properties": [
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 28,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 32,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 36,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 10,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 6,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 17,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 118,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the component state has student work. Sometimes a component\nstate may be created if the student visits a component but doesn't\nactually perform any work. This is where we will check if the student\nactually performed any work.\n",
+ "description": "Check if the component state has student work. Sometimes a component\nstate may be created if the student visits a component but doesn't\nactually perform any work. This is where we will check if the student\nactually performed any work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3634,
+ "end": 3648,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3628,
+ "end": 3633,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state object
\n"
+ },
+ {
+ "name": {
+ "pos": 3688,
+ "end": 3704,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3682,
+ "end": 3687,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3733,
+ "end": 3739,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the component state has any work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { ComponentService } from '../componentService';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class HTMLService extends ComponentService {\n getComponentTypeLabel(): string {\n return $localize`Rich Text (HTML)`;\n }\n\n createComponent() {\n const component: any = super.createComponent();\n component.type = 'HTML';\n component.html = $localize`Enter html here`;\n return component;\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any) {\n if (nodeEvents != null) {\n for (const nodeEvent of nodeEvents) {\n if (nodeEvent.event === 'nodeEntered') {\n return true;\n }\n }\n }\n return false;\n }\n\n componentHasWork(component: any) {\n return false;\n }\n\n componentUsesSaveButton() {\n return false;\n }\n\n componentUsesSubmitButton() {\n return false;\n }\n}\n",
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "IdeasSortingService",
+ "id": "injectable-IdeasSortingService-9bddfac8899f9fedd19b2c4b3bfb3dd04e528e4251354c2eb227aa712550332bfbcc0d3cdd50f1b7eb1471a2797102680947c3ba69c8169183c58e7840ba1756",
+ "file": "src/assets/wise5/services/ideasSortingService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "compareByStringNumericPrefix",
+ "args": [
+ {
+ "name": "idea",
+ "type": "IdeaData",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "otherIdea",
+ "type": "IdeaData",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 28,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "idea",
+ "type": "IdeaData",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "otherIdea",
+ "type": "IdeaData",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getSortedIdeasWithLetters",
+ "args": [
+ {
+ "name": "ideas",
+ "type": "IdeaData[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "IdeaData[]",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "ideas",
+ "type": "IdeaData[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "insertIdeasWithLetters",
+ "args": [
+ {
+ "name": "sorted",
+ "type": "IdeaData[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "sortedIdeasWithLetters",
+ "type": "IdeaData[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "IdeaData[]",
+ "typeParameters": [],
+ "line": 33,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "sorted",
+ "type": "IdeaData[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "sortedIdeasWithLetters",
+ "type": "IdeaData[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "sortByCount",
+ "args": [
+ {
+ "name": "ideas",
+ "type": "IdeaData[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "IdeaData[]",
+ "typeParameters": [],
+ "line": 6,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "ideas",
+ "type": "IdeaData[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "sortById",
+ "args": [
+ {
+ "name": "ideas",
+ "type": "IdeaData[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "IdeaData[]",
+ "typeParameters": [],
+ "line": 10,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "ideas",
+ "type": "IdeaData[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "stringContainsLetters",
+ "args": [
+ {
+ "name": "str",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 24,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "str",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "stringNumericPrefix",
+ "args": [
+ {
+ "name": "str",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 51,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "str",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { IdeaData } from '../components/common/cRater/IdeaData';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class IdeasSortingService {\n sortByCount(ideas: IdeaData[]): IdeaData[] {\n return ideas.filter((idea) => idea.count > 0).sort((a, b) => b.count - a.count);\n }\n\n sortById(ideas: IdeaData[]): IdeaData[] {\n let sorted = ideas\n .filter((idea) => !this.stringContainsLetters(idea.id))\n .sort((a, b) => Number(a.id) - Number(b.id));\n const sortedIdeasWithLetters = this.getSortedIdeasWithLetters(ideas);\n return this.insertIdeasWithLetters(sorted, sortedIdeasWithLetters);\n }\n\n private getSortedIdeasWithLetters(ideas: IdeaData[]): IdeaData[] {\n return ideas\n .filter((idea) => this.stringContainsLetters(idea.id))\n .sort((a, b) => this.compareByStringNumericPrefix(a, b));\n }\n\n private stringContainsLetters(str: string): boolean {\n return Array.from(str).some((char) => isNaN(Number(char)));\n }\n\n private compareByStringNumericPrefix(idea: IdeaData, otherIdea: IdeaData): number {\n const prefixDif = this.stringNumericPrefix(idea.id) - this.stringNumericPrefix(otherIdea.id);\n return prefixDif === 0 ? idea.id.localeCompare(otherIdea.id) : prefixDif;\n }\n\n private insertIdeasWithLetters(\n sorted: IdeaData[],\n sortedIdeasWithLetters: IdeaData[]\n ): IdeaData[] {\n for (let i = 0; i < sorted.length; i++) {\n while (\n sortedIdeasWithLetters.length > 0 &&\n Number(sorted.at(i).id) > this.stringNumericPrefix(sortedIdeasWithLetters.at(0).id)\n ) {\n const ideaWithLetter = sortedIdeasWithLetters.at(0);\n sortedIdeasWithLetters = sortedIdeasWithLetters.slice(1, sortedIdeasWithLetters.length);\n sorted.splice(i, 0, ideaWithLetter);\n i++;\n }\n }\n return sorted;\n }\n\n private stringNumericPrefix(str: string): number {\n let numericPrefix = '';\n const strArray = Array.from(str);\n for (let charIndex = 0; charIndex < strArray.length; charIndex++) {\n const char = strArray.at(charIndex);\n if (isNaN(Number(char))) {\n break;\n } else {\n numericPrefix = numericPrefix.concat(char);\n }\n }\n return Number(numericPrefix);\n }\n}\n",
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "ImportComponentService",
+ "id": "injectable-ImportComponentService-d48fb9710ea183eeecc07f73feae68ab06d06f16bac00effd09ffbb29434eeb4c05f8d691c78081a065c65e6ca1f93e94bfd158b4ef1f4181e93c919bfbbdc52",
+ "file": "src/assets/wise5/services/importComponentService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "importComponents",
+ "args": [
+ {
+ "name": "components",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "importProjectId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "insertAfterComponentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 27,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nImport components from a project. Also import asset files that are\nreferenced in any of those components.\n",
+ "description": "Import components from a project. Also import asset files that are\nreferenced in any of those components.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 786,
+ "end": 796,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "components"
+ },
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 780,
+ "end": 785,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "an array of component objects that we are importing
\n"
+ },
+ {
+ "name": {
+ "pos": 861,
+ "end": 876,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "importProjectId"
+ },
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 855,
+ "end": 860,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the id of the project we are importing from
\n"
+ },
+ {
+ "name": {
+ "pos": 933,
+ "end": 939,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 927,
+ "end": 932,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node we are adding the components to
\n"
+ },
+ {
+ "name": {
+ "pos": 993,
+ "end": 1015,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "insertAfterComponentId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 987,
+ "end": 992,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "insert the components after this component id
\n"
+ },
+ {
+ "tagName": {
+ "pos": 1068,
+ "end": 1074,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "an array of the new components
\n"
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { copy } from '../common/object/object';\nimport { ConfigService } from './configService';\nimport { CopyNodesService } from './copyNodesService';\nimport { InsertComponentService } from './insertComponentService';\nimport { TeacherProjectService } from './teacherProjectService';\nimport { map, Observable } from 'rxjs';\n\n@Injectable()\nexport class ImportComponentService {\n constructor(\n protected ConfigService: ConfigService,\n protected CopyNodesService: CopyNodesService,\n protected InsertComponentService: InsertComponentService,\n protected ProjectService: TeacherProjectService\n ) {}\n\n /**\n * Import components from a project. Also import asset files that are\n * referenced in any of those components.\n * @param components an array of component objects that we are importing\n * @param importProjectId the id of the project we are importing from\n * @param nodeId the node we are adding the components to\n * @param insertAfterComponentId insert the components after this component id\n * @return an array of the new components\n */\n importComponents(\n components: any[],\n importProjectId: number,\n nodeId: string,\n insertAfterComponentId: string\n ): Observable {\n const newComponents = [];\n const newComponentIds = [];\n for (const component of components) {\n const newComponent = copy(component);\n let newComponentId = newComponent.id;\n if (this.ProjectService.isComponentIdUsed(newComponentId)) {\n newComponentId = this.ProjectService.getUnusedComponentId(newComponentIds);\n newComponent.id = newComponentId;\n }\n newComponents.push(newComponent);\n newComponentIds.push(newComponentId);\n }\n\n return this.CopyNodesService.copyNodes(\n newComponents,\n importProjectId,\n this.ConfigService.getConfigParam('projectId')\n ).pipe(\n map((newComponents: any) => {\n this.InsertComponentService.insertComponents(newComponents, nodeId, insertAfterComponentId);\n return newComponents;\n })\n );\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "CopyNodesService",
+ "type": "CopyNodesService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "InsertComponentService",
+ "type": "InsertComponentService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "ProjectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 10,
+ "jsdoctags": [
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "CopyNodesService",
+ "type": "CopyNodesService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "InsertComponentService",
+ "type": "InsertComponentService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "ProjectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "InitializeVLEService",
+ "id": "injectable-InitializeVLEService-e83fb28dc19a4be99a3f8aa90543032d9b3a6698b7d90dbd2c982c2cc44cb2fb9e7a0a88b6bea674563e3f8a3e87e696055cced498ea434a09d9450877d845bc",
+ "file": "src/assets/wise5/services/initializeVLEService.ts",
+ "properties": [
+ {
+ "name": "initialized$",
+ "defaultValue": "this.intializedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 19,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "intializedSource",
+ "defaultValue": "new BehaviorSubject(false)",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "BehaviorSubject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 18,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "initializePreview",
+ "args": [
+ {
+ "name": "unitId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 58,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 134
+ ],
+ "jsdoctags": [
+ {
+ "name": "unitId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "initializeStudent",
+ "args": [
+ {
+ "name": "unitId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 36,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 134
+ ],
+ "jsdoctags": [
+ {
+ "name": "unitId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { VLEProjectService } from '../vle/vleProjectService';\nimport { AchievementService } from './achievementService';\nimport { ConfigService } from './configService';\nimport { NotebookService } from './notebookService';\nimport { PauseScreenService } from './pauseScreenService';\nimport { SessionService } from './sessionService';\nimport { StompService } from './stompService';\nimport { StudentAssetService } from './studentAssetService';\nimport { StudentDataService } from './studentDataService';\nimport { StudentNotificationService } from './studentNotificationService';\nimport { StudentStatusService } from './studentStatusService';\nimport { StudentWebSocketService } from './studentWebSocketService';\n\n@Injectable()\nexport class InitializeVLEService {\n private intializedSource: BehaviorSubject = new BehaviorSubject(false);\n public initialized$: Observable = this.intializedSource.asObservable();\n\n constructor(\n private achievementService: AchievementService,\n private configService: ConfigService,\n private notebookService: NotebookService,\n private notificationService: StudentNotificationService,\n private pauseScreenService: PauseScreenService,\n private projectService: VLEProjectService,\n private sessionService: SessionService,\n private stompService: StompService,\n private studentAssetService: StudentAssetService,\n private studentDataService: StudentDataService,\n private studentStatusService: StudentStatusService,\n private studentWebSocketService: StudentWebSocketService\n ) {}\n\n async initializeStudent(unitId: string) {\n await this.configService\n .retrieveConfig(`/api/config/studentRun/${unitId}`)\n .subscribe(async () => {\n this.sessionService.initializeSession();\n this.studentStatusService.retrieveStudentStatus();\n await this.projectService.retrieveProject().subscribe(async () => {\n await this.stompService.initialize();\n this.studentWebSocketService.initialize();\n await this.studentDataService.retrieveStudentData();\n await this.notificationService.retrieveNotifications();\n await this.achievementService.retrieveStudentAchievements();\n await this.studentDataService.retrieveRunStatus();\n this.pauseScreenService.initialize();\n this.notificationService.initialize();\n await this.studentAssetService.retrieveAssets();\n await this.notebookService.retrieveNotebookItems(this.configService.getWorkgroupId());\n this.intializedSource.next(true);\n });\n });\n }\n\n async initializePreview(unitId: string) {\n this.configService.retrieveConfig(`/api/config/preview/${unitId}`).subscribe(async () => {\n await this.projectService.retrieveProject().subscribe(async () => {\n this.studentDataService.retrieveStudentData();\n this.studentDataService.retrieveRunStatus();\n this.notificationService.retrieveNotifications();\n this.intializedSource.next(true);\n });\n });\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "achievementService",
+ "type": "AchievementService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "notebookService",
+ "type": "NotebookService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "notificationService",
+ "type": "StudentNotificationService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "pauseScreenService",
+ "type": "PauseScreenService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "VLEProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "sessionService",
+ "type": "SessionService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "stompService",
+ "type": "StompService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentDataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentStatusService",
+ "type": "StudentStatusService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentWebSocketService",
+ "type": "StudentWebSocketService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 19,
+ "jsdoctags": [
+ {
+ "name": "achievementService",
+ "type": "AchievementService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "notebookService",
+ "type": "NotebookService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "notificationService",
+ "type": "StudentNotificationService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "pauseScreenService",
+ "type": "PauseScreenService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "VLEProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "sessionService",
+ "type": "SessionService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "stompService",
+ "type": "StompService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentDataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentStatusService",
+ "type": "StudentStatusService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentWebSocketService",
+ "type": "StudentWebSocketService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "InsertComponentService",
+ "id": "injectable-InsertComponentService-5ce0bf499cfc3e98b3551550878087cc6f765f9be36c61565db9cd952ed903083f197d4df67d9a0754502338c64fdbd1baa60332ff80a8dca56f33018d31a35d",
+ "file": "src/assets/wise5/services/insertComponentService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "getInitialInsertPosition",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "insertAfterComponentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 17,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "insertAfterComponentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "insertComponents",
+ "args": [
+ {
+ "name": "components",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "insertAfterComponentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 8,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "components",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "insertAfterComponentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { TeacherProjectService } from './teacherProjectService';\n\n@Injectable()\nexport class InsertComponentService {\n constructor(protected projectService: TeacherProjectService) {}\n\n insertComponents(components: any[], nodeId: string, insertAfterComponentId: string): void {\n const node = this.projectService.getNodeById(nodeId);\n let insertPosition = this.getInitialInsertPosition(nodeId, insertAfterComponentId);\n components.forEach((component) => {\n node.components.splice(insertPosition, 0, component);\n insertPosition++;\n });\n }\n\n private getInitialInsertPosition(nodeId: string, insertAfterComponentId: string): number {\n return insertAfterComponentId == null\n ? 0\n : this.projectService.getNode(nodeId).getComponentPosition(insertAfterComponentId) + 1;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 5,
+ "jsdoctags": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "InsertFirstNodeInBranchPathService",
+ "id": "injectable-InsertFirstNodeInBranchPathService-7c46307d0399cb86bbd45b4a100ef9caeb1e5665ef974f2264fd0da284d8f53eabd67861dacdc73cce56e32120401d782c95ad90e0ffe031240788f91289de61",
+ "file": "src/assets/wise5/services/insertFirstNodeInBranchPathService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "insertNode",
+ "args": [
+ {
+ "name": "newNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdBefore",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 8,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "newNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeIdBefore",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeIdAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "insertNodeBeforeInGroup",
+ "args": [
+ {
+ "name": "group",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "newNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 40,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "group",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "newNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeIdAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "insertNodeBetweenInGroups",
+ "args": [
+ {
+ "name": "newNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 31,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "newNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeIdAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "insertNodeBetweenInTransitions",
+ "args": [
+ {
+ "name": "newNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdBefore",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 52,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "newNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeIdBefore",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeIdAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "insertNodes",
+ "args": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "targetId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "firstNodeInBranchPath",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 20,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "targetId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "firstNodeInBranchPath",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateBranchPathTakenConstraintToNode",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "toNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 75,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "toNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { TeacherProjectService } from './teacherProjectService';\n\n@Injectable()\nexport class InsertFirstNodeInBranchPathService {\n constructor(private projectService: TeacherProjectService) {}\n\n insertNode(newNode: any, nodeIdBefore: string, nodeIdAfter: string): void {\n if (this.projectService.isInactive(nodeIdBefore)) {\n this.projectService.setIdToNode(newNode.id, newNode);\n this.projectService.addInactiveNodeInsertAfter(newNode, nodeIdBefore);\n } else {\n this.projectService.addNode(newNode);\n this.projectService.setIdToNode(newNode.id, newNode);\n this.insertNodeBetweenInGroups(newNode.id, nodeIdAfter);\n this.insertNodeBetweenInTransitions(newNode, nodeIdBefore, nodeIdAfter);\n }\n }\n\n insertNodes(nodes: any[], targetId: string, firstNodeInBranchPath: string): void {\n for (const node of nodes) {\n if (this.projectService.isFirstNodeInBranchPath(firstNodeInBranchPath)) {\n this.insertNode(node, targetId, firstNodeInBranchPath);\n } else {\n this.projectService.createNodeAfter(node, targetId);\n }\n targetId = node.id;\n }\n }\n\n private insertNodeBetweenInGroups(newNodeId: string, nodeIdAfter: string): void {\n for (const group of this.projectService.getGroupNodes()) {\n this.insertNodeBeforeInGroup(group, newNodeId, nodeIdAfter);\n }\n for (const inactiveGroup of this.projectService.getInactiveGroupNodes()) {\n this.insertNodeBeforeInGroup(inactiveGroup, newNodeId, nodeIdAfter);\n }\n }\n\n private insertNodeBeforeInGroup(group: any, newNodeId: string, nodeIdAfter: string): boolean {\n const ids = group.ids;\n for (let i = 0; i < ids.length; i++) {\n const id = ids[i];\n if (nodeIdAfter === id) {\n ids.splice(i, 0, newNodeId);\n return true;\n }\n }\n return false;\n }\n\n private insertNodeBetweenInTransitions(\n newNode: any,\n nodeIdBefore: string,\n nodeIdAfter: string\n ): void {\n const nodeBefore = this.projectService.getNodeById(nodeIdBefore);\n const nodeBeforeTransition = nodeBefore.transitionLogic.transitions.find(\n (transition: any) => transition.to === nodeIdAfter\n );\n nodeBeforeTransition.to = newNode.id;\n newNode.transitionLogic.transitions = [{ to: nodeIdAfter }];\n this.projectService.updateBranchPathTakenConstraints(newNode, nodeIdAfter);\n nodeBefore.transitionLogic.transitions;\n const branch = this.projectService.getBranchesByBranchStartPointNodeId(nodeIdBefore)[0];\n const path = branch.paths.find((path) => path[0] === newNode.id);\n for (const nodeInPath of path) {\n this.updateBranchPathTakenConstraintToNode(\n this.projectService.getNodeById(nodeInPath),\n newNode.id\n );\n }\n }\n\n private updateBranchPathTakenConstraintToNode(node: any, toNodeId: string): void {\n const constraints = node.constraints;\n for (const constraint of constraints) {\n for (const removalCriterion of constraint.removalCriteria) {\n if (removalCriterion.name === 'branchPathTaken') {\n removalCriterion.params.toNodeId = toNodeId;\n }\n }\n }\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 5,
+ "jsdoctags": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "InsertNodesService",
+ "id": "injectable-InsertNodesService-1ea3abdbc3641597b3e46d0fab11a4f298f35f3e10e16166f15e681eefcf0365b63a59704cc31b23e73aa0fccfa329a60022670307bc112e306e72bd42d8575a",
+ "file": "src/assets/wise5/services/insertNodesService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "insertNodes",
+ "args": [
+ {
+ "name": "nodes",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "targetId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 14,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nInsert nodes in specified location. Modifies project.\nnew step the first step in the group. If this is a step, we will place the new step after it.\n",
+ "description": "Insert nodes in specified location. Modifies project.\nnew step the first step in the group. If this is a step, we will place the new step after it.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 300,
+ "end": 305,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodes"
+ },
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 294,
+ "end": 299,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "nodes to insert
\n"
+ },
+ {
+ "name": {
+ "pos": 334,
+ "end": 342,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "targetId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 328,
+ "end": 333,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "id of node or group. If this is a group, we will make the\nnew step the first step in the group. If this is a step, we will place the new step after it.
\n"
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { TeacherProjectService } from './teacherProjectService';\n\n@Injectable()\nexport class InsertNodesService {\n constructor(private projectService: TeacherProjectService) {}\n\n /**\n * Insert nodes in specified location. Modifies project.\n * @param nodes nodes to insert\n * @param targetId id of node or group. If this is a group, we will make the\n * new step the first step in the group. If this is a step, we will place the new step after it.\n */\n insertNodes(nodes: any[], targetId: string): void {\n if (targetId == null) {\n /*\n * Insert the node after the last inactive node. If there\n * are no inactive nodes it will just be placed in the\n * inactive nodes section. In the latter case we do this by\n * setting targetId to 'inactiveSteps'.\n */\n const inactiveNodes = this.projectService.getInactiveNodes();\n if (inactiveNodes != null && inactiveNodes.length > 0) {\n targetId = inactiveNodes[inactiveNodes.length - 1];\n } else {\n targetId = 'inactiveSteps';\n }\n }\n\n for (const node of nodes) {\n if (this.projectService.isGroupNode(targetId)) {\n this.projectService.createNodeInside(node, targetId);\n } else {\n this.projectService.createNodeAfter(node, targetId);\n }\n\n /*\n * Update the targetId so that when we are\n * importing multiple steps, the steps get placed in the correct\n * order.\n *\n * Example\n * We are importing nodeA and nodeB and want to place them after\n * nodeX. Therefore we want the order to be\n *\n * nodeX\n * nodeA\n * nodeB\n *\n * This means after we add nodeA, we must update\n * targetId to be nodeA so that when we add\n * nodeB, it will be placed after nodeA.\n */\n targetId = node.id;\n }\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 5,
+ "jsdoctags": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "LabelService",
+ "id": "injectable-LabelService-c834bae9968444453ff419280c3614772d4e68cc6b1bf27347b53af117d58a0b00845987eb954576530019a99304ec96d1fe46492d5e794525849603b6e2bfd6",
+ "file": "src/assets/wise5/components/label/labelService.ts",
+ "properties": [
+ {
+ "name": "circleZIndex",
+ "defaultValue": "2",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15
+ },
+ {
+ "name": "defaultTextBackgroundColor",
+ "defaultValue": "'blue'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16
+ },
+ {
+ "name": "lineZIndex",
+ "defaultValue": "0",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13
+ },
+ {
+ "name": "textZIndex",
+ "defaultValue": "1",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14
+ },
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "addLabelsToCanvas",
+ "args": [
+ {
+ "name": "canvas",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "labels",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "width",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "height",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "pointSize",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "fontSize",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "labelWidth",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "enableCircles",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentDataVersion",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 312,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "canvas",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "labels",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "width",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "height",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "pointSize",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "fontSize",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "labelWidth",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "enableCircles",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentDataVersion",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "addLabelToCanvas",
+ "args": [
+ {
+ "name": "canvas",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "label",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "enableCircles",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 459,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "canvas",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "label",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "enableCircles",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "canEdit",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 82,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nDetermine if the student can perform any work on this component.\n",
+ "description": "Determine if the student can perform any work on this component.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2558,
+ "end": 2567,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2552,
+ "end": 2557,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The component content.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2597,
+ "end": 2603,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "Whether the student can perform any work on this component.
\n"
+ }
+ ]
+ },
+ {
+ "name": "componentHasStarterLabel",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 101,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentStateHasLabel",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 69,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 86,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentStateHasSubmitWithLabel",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 65,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentStateIsSameAsStarter",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 113,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if the component state has the exact same labels as the starter\nlabels.\nstarter labels\n",
+ "description": "Check if the component state has the exact same labels as the starter\nlabels.\nstarter labels
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3537,
+ "end": 3551,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3531,
+ "end": 3536,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state object
\n"
+ },
+ {
+ "name": {
+ "pos": 3591,
+ "end": 3607,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3585,
+ "end": 3590,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3636,
+ "end": 3642,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether the component state has the exact same labels as the\nstarter labels
\n"
+ }
+ ]
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createImageFromText",
+ "args": [
+ {
+ "name": "text",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "width",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "height",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "maxCharactersPerLine",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "xPositionOfText",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "spaceInbetweenLines",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "fontSize",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 134,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreate an image from the text string.\n",
+ "description": "Create an image from the text string.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 4175,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "text"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4169,
+ "end": 4174,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "A text string.
\n"
+ },
+ {
+ "name": {
+ "pos": 4207,
+ "end": 4212,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "width"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4201,
+ "end": 4206,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The width of the image we will create.
\n"
+ },
+ {
+ "name": {
+ "pos": 4264,
+ "end": 4270,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "height"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4258,
+ "end": 4263,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The height of the image we will create.
\n"
+ },
+ {
+ "name": {
+ "pos": 4323,
+ "end": 4343,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "maxCharactersPerLine"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4317,
+ "end": 4322,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The max number of characters per line.
\n"
+ },
+ {
+ "name": {
+ "pos": 4395,
+ "end": 4410,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "xPositionOfText"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4389,
+ "end": 4394,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The x position of the text in the image.
\n"
+ },
+ {
+ "name": {
+ "pos": 4464,
+ "end": 4483,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "spaceInbetweenLines"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4458,
+ "end": 4463,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The amount of space inbetween each line.
\n"
+ },
+ {
+ "name": {
+ "pos": 4537,
+ "end": 4545,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "fontSize"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4531,
+ "end": 4536,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The font size.
\n"
+ }
+ ]
+ },
+ {
+ "name": "createLabel",
+ "args": [
+ {
+ "name": "pointX",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "pointY",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "textX",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "textY",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "textString",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "color",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.defaultTextBackgroundColor"
+ },
+ {
+ "name": "canEdit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "true"
+ },
+ {
+ "name": "canDelete",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "true"
+ },
+ {
+ "name": "canvasWidth",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "canvasHeight",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "pointSize",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "5"
+ },
+ {
+ "name": "fontSize",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "20"
+ },
+ {
+ "name": "labelWidth",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentDataVersion",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "2"
+ },
+ {
+ "name": "timestamp",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isStarterLabel",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 350,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "pointX",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "pointY",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "textX",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "textY",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "textString",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "color",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.defaultTextBackgroundColor",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "canEdit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "true",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "canDelete",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "true",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "canvasWidth",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "canvasHeight",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "pointSize",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "5",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "fontSize",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "20",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "labelWidth",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentDataVersion",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "2",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "timestamp",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isStarterLabel",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "generateImage",
+ "args": [
+ {
+ "name": "svgString",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 208,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "svgString",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "generateImageFromRenderedComponentState",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 277,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nThe component state has been rendered in a element\nand now we want to take a snapshot of the work.\n",
+ "description": "The component state has been rendered in a element\nand now we want to take a snapshot of the work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 9600,
+ "end": 9614,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 9594,
+ "end": 9599,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The component state that has been rendered.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 9665,
+ "end": 9671,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "A promise that will return an image object.
\n"
+ }
+ ]
+ },
+ {
+ "name": "getCanvas",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 287,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCanvasId",
+ "args": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 22,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getSVGTextElementString",
+ "args": [
+ {
+ "name": "fontSize",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "tspans",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 264,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "fontSize",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "tspans",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getTimestamp",
+ "args": [],
+ "optional": false,
+ "returnType": "number",
+ "typeParameters": [],
+ "line": 479,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getTSpans",
+ "args": [
+ {
+ "name": "textWrapped",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "xPositionOfText",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "spaceInbetweenLines",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 255,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "textWrapped",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "xPositionOfText",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "spaceInbetweenLines",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "initializeCanvas",
+ "args": [
+ {
+ "name": "canvasId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "width",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "height",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isDisabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 293,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "canvasId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "width",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "height",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isDisabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 47,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "setBackgroundImage",
+ "args": [
+ {
+ "name": "canvas",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "backgroundPath",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 475,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "canvas",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "backgroundPath",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setCanvasDimension",
+ "args": [
+ {
+ "name": "canvas",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "width",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "height",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 307,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "canvas",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "width",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "height",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 147,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { fabric } from 'fabric';\nimport SVG from 'svg.js';\nimport { ComponentService } from '../componentService';\nimport { StudentAssetService } from '../../services/studentAssetService';\nimport { Injectable } from '@angular/core';\nimport { convertToPNGFile } from '../../common/canvas/canvas';\nimport { wordWrap } from '../../common/string/string';\nimport { hasConnectedComponent } from '../../common/ComponentContent';\nimport { labelArraysAreTheSame, makeSureValueIsWithinLimit } from './label';\n\n@Injectable()\nexport class LabelService extends ComponentService {\n lineZIndex: number = 0;\n textZIndex: number = 1;\n circleZIndex: number = 2;\n defaultTextBackgroundColor: string = 'blue';\n\n constructor(private assetService: StudentAssetService) {\n super();\n }\n\n getComponentTypeLabel(): string {\n return $localize`Label`;\n }\n\n getCanvasId(domIdEnding: string): string {\n return this.getElementId('canvas', domIdEnding);\n }\n\n createComponent() {\n const component: any = super.createComponent();\n component.type = 'Label';\n component.backgroundImage = '';\n component.canCreateLabels = true;\n component.canEditLabels = true;\n component.canDeleteLabels = true;\n component.enableCircles = true;\n component.width = 800;\n component.height = 600;\n component.pointSize = 5;\n component.fontSize = 20;\n component.labelWidth = 20;\n component.labels = [];\n return component;\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any) {\n if (!this.canEdit(component) && this.hasNodeEnteredEvent(nodeEvents)) {\n return true;\n }\n if (componentStates != null && componentStates.length > 0) {\n if (this.isSubmitRequired(node, component)) {\n for (let i = componentStates.length - 1; i >= 0; i--) {\n if (this.componentStateHasSubmitWithLabel(componentStates[i])) {\n return true;\n }\n }\n } else {\n return this.componentStateHasLabel(componentStates[componentStates.length - 1]);\n }\n }\n return false;\n }\n\n componentStateHasSubmitWithLabel(componentState: any) {\n return componentState.isSubmit && this.componentStateHasLabel(componentState);\n }\n\n componentStateHasLabel(componentState: any) {\n if (componentState != null) {\n const studentData = componentState.studentData;\n return studentData != null && studentData.labels != null && studentData.labels.length > 0;\n }\n return false;\n }\n\n /**\n * Determine if the student can perform any work on this component.\n * @param component The component content.\n * @return Whether the student can perform any work on this component.\n */\n canEdit(component: any): boolean {\n return !hasConnectedComponent(component, 'showWork');\n }\n\n componentStateHasStudentWork(componentState: any, componentContent: any): boolean {\n if (componentContent == null) {\n return this.componentStateHasLabel(componentState);\n } else {\n if (this.componentHasStarterLabel(componentContent)) {\n return (\n componentState != null &&\n !labelArraysAreTheSame(componentState.studentData.labels, componentContent.labels)\n );\n } else {\n return this.componentStateHasLabel(componentState);\n }\n }\n }\n\n private componentHasStarterLabel(componentContent: any): boolean {\n return componentContent.labels != null && componentContent.labels.length > 0;\n }\n\n /**\n * Check if the component state has the exact same labels as the starter\n * labels.\n * @param componentState the component state object\n * @param componentContent the component content\n * @return whether the component state has the exact same labels as the\n * starter labels\n */\n componentStateIsSameAsStarter(componentState: any, componentContent: any) {\n if (componentState != null) {\n if (this.componentHasStarterLabel(componentContent)) {\n return labelArraysAreTheSame(componentState.studentData.labels, componentContent.labels);\n } else {\n return !this.componentStateHasLabel(componentState);\n }\n }\n return false;\n }\n\n /**\n * Create an image from the text string.\n * @param text A text string.\n * @param width The width of the image we will create.\n * @param height The height of the image we will create.\n * @param maxCharactersPerLine The max number of characters per line.\n * @param xPositionOfText The x position of the text in the image.\n * @param spaceInbetweenLines The amount of space inbetween each line.\n * @param fontSize The font size.\n */\n createImageFromText(\n text: string,\n width: any,\n height: any,\n maxCharactersPerLine: any,\n xPositionOfText: any,\n spaceInbetweenLines: any,\n fontSize: any\n ) {\n if (width == null || width === '') {\n width = 800;\n }\n if (height == null || height === '') {\n height = 600;\n }\n if (maxCharactersPerLine == null || maxCharactersPerLine === '') {\n maxCharactersPerLine = 100;\n }\n if (xPositionOfText == null || xPositionOfText === '') {\n xPositionOfText = 10;\n }\n if (spaceInbetweenLines == null || spaceInbetweenLines === '') {\n spaceInbetweenLines = 40;\n }\n if (fontSize == null || fontSize === '') {\n fontSize = 16;\n }\n\n /*\n * Line wrap the text so that each line does not exceed the max number of\n * characters.\n */\n const textWrapped = wordWrap(text, maxCharactersPerLine);\n\n // create a div to draw the SVG in\n const svgElement = document.createElement('div');\n const draw = SVG(svgElement);\n draw.width(width);\n draw.height(height);\n\n /*\n * We will create a tspan for each line.\n * Example\n * The quick brown fox jumps over the lazy dog. One fish, two fish, red fish, blue fish. Green eggs \n * and ham. \n */\n const tspans = this.getTSpans(textWrapped, xPositionOfText, spaceInbetweenLines);\n\n /*\n * Wrap the tspans in a text element.\n * Example\n * \n * The quick brown fox jumps over the lazy dog. One fish, two fish, red fish, blue fish. Green eggs \n * and ham. \n * \n */\n const svgTextElementString = this.getSVGTextElementString(fontSize, tspans);\n\n /*\n * Insert the text element into the svg.\n * Example\n * \n * \n * \n * The quick brown fox jumps over the lazy dog. One fish, two fish, red fish, blue fish. Green eggs \n * and ham. \n * \n * \n */\n const svgString = svgElement.innerHTML.replace('', svgTextElementString + '');\n\n return this.generateImage(svgString);\n }\n\n generateImage(svgString: string) {\n // create a canvas to draw the image on\n const myCanvas = document.createElement('canvas');\n const ctx = myCanvas.getContext('2d');\n\n // create an svg blob\n const svg = new Blob([svgString], { type: 'image/svg+xml;charset=utf-8' });\n const domURL = self.URL || (self as any).webkitURL || self;\n const url = domURL.createObjectURL(svg);\n const image = new Image();\n return new Promise((resolve, reject) => {\n image.onload = (event) => {\n const image: any = event.target;\n myCanvas.width = image.width;\n myCanvas.height = image.height;\n ctx.drawImage(image, 0, 0);\n const pngFile = convertToPNGFile(myCanvas);\n this.assetService.uploadAsset(pngFile).then((unreferencedAsset) => {\n /*\n * make a copy of the unreferenced asset so that we\n * get a referenced asset\n */\n this.assetService.copyAssetForReference(unreferencedAsset).then((referencedAsset) => {\n if (referencedAsset != null) {\n /*\n * get the asset url\n * for example\n * /wise/studentuploads/11261/297478/referenced/picture_1494016652542.png\n * if we are in preview mode this url will be a base64 string instead\n */\n const referencedAssetUrl = referencedAsset.url;\n\n // remove the unreferenced asset\n this.assetService.deleteAsset(unreferencedAsset);\n\n // resolve the promise with the image url\n resolve(referencedAssetUrl);\n }\n });\n });\n };\n\n // set the src of the image so that the image gets loaded\n image.src = url;\n });\n }\n\n getTSpans(textWrapped: string, xPositionOfText: any, spaceInbetweenLines: any) {\n let tspans = '';\n const textLines = textWrapped.split('\\n');\n for (const textLine of textLines) {\n tspans += `${textLine} `;\n }\n return tspans;\n }\n\n getSVGTextElementString(fontSize: any, tspans: string) {\n return (\n `${tspans} `\n );\n }\n\n /**\n * The component state has been rendered in a element\n * and now we want to take a snapshot of the work.\n * @param componentState The component state that has been rendered.\n * @return A promise that will return an image object.\n */\n generateImageFromRenderedComponentState(componentState: any) {\n return new Promise((resolve, reject) => {\n const canvas = this.getCanvas(componentState);\n const pngFile = convertToPNGFile(canvas);\n this.assetService.uploadAsset(pngFile).then((asset: any) => {\n resolve(asset);\n });\n });\n }\n\n getCanvas(componentState: any): any {\n return document.querySelector(\n `#canvas-${componentState.nodeId}-${componentState.componentId}-${componentState.id}`\n );\n }\n\n initializeCanvas(canvasId: string, width: number, height: number, isDisabled: boolean): any {\n let canvas: any = null;\n if (isDisabled) {\n canvas = new fabric.StaticCanvas(canvasId);\n } else {\n canvas = new fabric.Canvas(canvasId);\n }\n canvas.selection = false;\n canvas.hoverCursor = 'pointer';\n this.setCanvasDimension(canvas, width, height);\n $('#canvasParent_' + canvasId).css('height', height + 2);\n return canvas;\n }\n\n setCanvasDimension(canvas: any, width: number, height: number): void {\n canvas.setWidth(width);\n canvas.setHeight(height);\n }\n\n addLabelsToCanvas(\n canvas: any,\n labels: any[],\n width: number,\n height: number,\n pointSize: number,\n fontSize: number,\n labelWidth: number,\n enableCircles: boolean,\n studentDataVersion: number\n ): any[] {\n const fabricLabels: any[] = [];\n labels.forEach((label) => {\n const timestamp = label.timestamp ? label.timestamp : this.getTimestamp();\n const fabricLabel = this.createLabel(\n label.pointX,\n label.pointY,\n label.textX,\n label.textY,\n label.text,\n label.color,\n label.canEdit,\n label.canDelete,\n width,\n height,\n pointSize,\n fontSize,\n labelWidth,\n studentDataVersion,\n timestamp,\n label.isStarterLabel\n );\n this.addLabelToCanvas(canvas, fabricLabel, enableCircles);\n fabricLabels.push(fabricLabel);\n });\n return fabricLabels;\n }\n\n createLabel(\n pointX: number,\n pointY: number,\n textX: number,\n textY: number,\n textString: string,\n color: string = this.defaultTextBackgroundColor,\n canEdit: boolean = true,\n canDelete: boolean = true,\n canvasWidth: number,\n canvasHeight: number,\n pointSize: number = 5,\n fontSize: number = 20,\n labelWidth: number,\n studentDataVersion: number = 2,\n timestamp: number,\n isStarterLabel: boolean\n ): any {\n // get the position of the point\n let x1: number = pointX;\n let y1: number = pointY;\n let x2: number = null;\n let y2: number = null;\n\n if (studentDataVersion === 1) {\n // get the absolute position of the text\n x2 = pointX + textX;\n y2 = pointY + textY;\n } else {\n x2 = textX;\n y2 = textY;\n }\n\n /*\n * Make sure all the positions are within the bounds of the canvas. If there\n * are any positions that are outside the bounds, we will change the\n * position to be within the bounds.\n */\n x1 = makeSureValueIsWithinLimit(x1, canvasWidth);\n y1 = makeSureValueIsWithinLimit(y1, canvasHeight);\n x2 = makeSureValueIsWithinLimit(x2, canvasWidth);\n y2 = makeSureValueIsWithinLimit(y2, canvasHeight);\n\n const circle: any = new fabric.Circle({\n radius: pointSize,\n left: x1,\n top: y1,\n originX: 'center',\n originY: 'center',\n hasControls: false,\n borderColor: 'red',\n hasBorders: true,\n selectable: true\n });\n\n const line: any = new fabric.Line([x1, y1, x2, y2], {\n fill: 'black',\n stroke: 'black',\n strokeWidth: 3,\n selectable: false\n });\n\n let wrappedTextString = textString;\n if (labelWidth != null) {\n wrappedTextString = wordWrap(textString, labelWidth);\n }\n\n // create an editable text element\n const text: any = new fabric.IText(wrappedTextString, {\n left: x2,\n top: y2,\n originX: 'center',\n originY: 'center',\n fontSize: fontSize,\n fill: 'white',\n backgroundColor: color,\n width: 100,\n hasControls: false,\n hasBorders: true,\n borderColor: 'red',\n borderDashArray: [8, 8],\n borderScaleFactor: 3,\n borderOpacityWhenMoving: 1,\n selectable: true,\n cursorWidth: 0,\n editable: false,\n padding: 16\n });\n\n // give the circle a reference to the line and text elements\n circle.line = line;\n circle.text = text;\n\n // give the text element a reference to the line and circle elements\n text.line = line;\n text.circle = circle;\n\n return {\n circle: circle,\n line: line,\n text: text,\n textString: textString,\n canEdit: canEdit,\n canDelete: canDelete,\n timestamp: timestamp,\n isStarterLabel: isStarterLabel\n };\n }\n\n addLabelToCanvas(canvas: any, label: any, enableCircles: boolean): void {\n const circle: any = label.circle;\n const line: any = label.line;\n const text: any = label.text;\n if (enableCircles) {\n canvas.add(circle, line, text);\n canvas.moveTo(line, this.lineZIndex);\n canvas.moveTo(text, this.textZIndex);\n canvas.moveTo(circle, this.circleZIndex);\n } else {\n canvas.add(text);\n canvas.moveTo(text, this.textZIndex);\n }\n canvas.renderAll();\n }\n\n setBackgroundImage(canvas: any, backgroundPath: string): void {\n canvas.setBackgroundImage(backgroundPath, canvas.renderAll.bind(canvas));\n }\n\n getTimestamp(): number {\n return new Date().getTime();\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "assetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 16,
+ "jsdoctags": [
+ {
+ "name": "assetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "LibraryPaginatorIntl",
+ "id": "injectable-LibraryPaginatorIntl-f20451c5430528da3fffd0538e4d128000823ec4961a43a9c9a1d182ab7457c1250e4c944513f158779b903b2fe3e4d19983eb2529d66db2929c4937438ad273",
+ "file": "src/app/modules/library/libraryPaginatorIntl.ts",
+ "properties": [
+ {
+ "name": "getRangeLabel",
+ "defaultValue": "function (page, pageSize, length) {\n if (length == 0 || pageSize == 0) {\n return $localize`0 of ${length}:total:`;\n }\n const startIndex = page * pageSize + 1;\n const endIndex =\n startIndex < length ? Math.min(startIndex + pageSize - 1, length) : startIndex + pageSize - 1;\n return $localize`${startIndex}:start: - ${endIndex}:end: of ${length}:total:`;\n }",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10
+ },
+ {
+ "name": "itemsPerPageLabel",
+ "defaultValue": "$localize`Show:`",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 6
+ },
+ {
+ "name": "nextPageLabel",
+ "defaultValue": "$localize`Next page`",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 7
+ },
+ {
+ "name": "previousPageLabel",
+ "defaultValue": "$localize`Previous page`",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 8
+ }
+ ],
+ "methods": [],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { MatPaginatorIntl } from '@angular/material/paginator';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class LibraryPaginatorIntl extends MatPaginatorIntl {\n itemsPerPageLabel = $localize`Show:`;\n nextPageLabel = $localize`Next page`;\n previousPageLabel = $localize`Previous page`;\n\n getRangeLabel = function (page, pageSize, length) {\n if (length == 0 || pageSize == 0) {\n return $localize`0 of ${length}:total:`;\n }\n const startIndex = page * pageSize + 1;\n const endIndex =\n startIndex < length ? Math.min(startIndex + pageSize - 1, length) : startIndex + pageSize - 1;\n return $localize`${startIndex}:start: - ${endIndex}:end: of ${length}:total:`;\n };\n}\n",
+ "extends": [
+ "MatPaginatorIntl"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "LibraryService",
+ "id": "injectable-LibraryService-33fa4ba66eb40e61fb10cf12d6a46b44a27f07914d6f0707afcea61855eac406b367331b63da47732e762b9e463fb774a1b6614a9c64eea413256a76db404683",
+ "file": "src/app/services/library.service.ts",
+ "properties": [
+ {
+ "name": "communityLibraryProjectsSource",
+ "defaultValue": "new BehaviorSubject([])",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 22,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "communityLibraryProjectsSource$",
+ "defaultValue": "this.communityLibraryProjectsSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 23,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "communityProjectsUrl",
+ "defaultValue": "'/api/project/community'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "copyProjectUrl",
+ "defaultValue": "'/api/project/copy'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "libraryGroups",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "LibraryGroup[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 17,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "libraryGroupsSource",
+ "defaultValue": "new BehaviorSubject([])",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 18,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "libraryGroupsSource$",
+ "defaultValue": "this.libraryGroupsSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 19,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "libraryGroupsUrl",
+ "defaultValue": "'/api/project/library'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "newProjectSource",
+ "defaultValue": "new BehaviorSubject(null)",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 28,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "newProjectSource$",
+ "defaultValue": "this.newProjectSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 29,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "numberOfPersonalProjectsVisible",
+ "defaultValue": "new BehaviorSubject(0)",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 32,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "numberOfPersonalProjectsVisible$",
+ "defaultValue": "this.numberOfPersonalProjectsVisible.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 33,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "numberOfPublicProjectsVisible",
+ "defaultValue": "new BehaviorSubject(0)",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 30,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "numberOfPublicProjectsVisible$",
+ "defaultValue": "this.numberOfPublicProjectsVisible.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 31,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "officialLibraryProjectsSource",
+ "defaultValue": "new BehaviorSubject([])",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 20,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "officialLibraryProjectsSource$",
+ "defaultValue": "this.officialLibraryProjectsSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 21,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "personalLibraryProjectsSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 24,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "personalLibraryProjectsSource$",
+ "defaultValue": "this.personalLibraryProjectsSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 25,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "personalProjectsUrl",
+ "defaultValue": "'/api/project/personal'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "projectInfoUrl",
+ "defaultValue": "'/api/project/info'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "sharedLibraryProjectsSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 26,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "sharedLibraryProjectsSource$",
+ "defaultValue": "this.sharedLibraryProjectsSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 27,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "sharedProjectsUrl",
+ "defaultValue": "'/api/project/shared'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "addPersonalLibraryProject",
+ "args": [
+ {
+ "name": "project",
+ "type": "LibraryProject",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 128,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "project",
+ "type": "LibraryProject",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "clearAll",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 145,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "convertLibraryGroup",
+ "args": [
+ {
+ "name": "libraryObj",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 61,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "libraryObj",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "convertLibraryGroups",
+ "args": [
+ {
+ "name": "libraryGroups",
+ "type": "LibraryGroup[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 53,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "libraryGroups",
+ "type": "LibraryGroup[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "convertToLibraryProjects",
+ "args": [
+ {
+ "name": "projectsJSON",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 100,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "projectsJSON",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "copyProject",
+ "args": [
+ {
+ "name": "projectId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 121,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "projectId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCommunityLibraryProjects",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 75,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getOfficialLibraryProjects",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 40,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getPersonalLibraryProjects",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 83,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getProjectInfo",
+ "args": [
+ {
+ "name": "projectId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 133,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "projectId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getSharedLibraryProjects",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 90,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "populateProjects",
+ "args": [
+ {
+ "name": "item",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projects",
+ "type": "LibraryProject[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 109,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "item",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projects",
+ "type": "LibraryProject[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateNumberOfPersonalProjectsVisible",
+ "args": [
+ {
+ "name": "count",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 141,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "count",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateNumberOfPublicProjectsVisible",
+ "args": [
+ {
+ "name": "count",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 137,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "count",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject, Subject } from 'rxjs';\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\nimport { LibraryGroup } from '../modules/library/libraryGroup';\nimport { LibraryProject } from '../modules/library/libraryProject';\nimport { Project } from '../domain/project';\nimport { Router } from '@angular/router';\n\n@Injectable({ providedIn: 'root' })\nexport class LibraryService {\n private libraryGroupsUrl = '/api/project/library';\n private communityProjectsUrl = '/api/project/community';\n private personalProjectsUrl = '/api/project/personal';\n private sharedProjectsUrl = '/api/project/shared';\n private copyProjectUrl = '/api/project/copy';\n private projectInfoUrl = '/api/project/info';\n public libraryGroups: LibraryGroup[];\n private libraryGroupsSource = new BehaviorSubject([]);\n public libraryGroupsSource$ = this.libraryGroupsSource.asObservable();\n private officialLibraryProjectsSource = new BehaviorSubject([]);\n public officialLibraryProjectsSource$ = this.officialLibraryProjectsSource.asObservable();\n private communityLibraryProjectsSource = new BehaviorSubject([]);\n public communityLibraryProjectsSource$ = this.communityLibraryProjectsSource.asObservable();\n private personalLibraryProjectsSource = new Subject();\n public personalLibraryProjectsSource$ = this.personalLibraryProjectsSource.asObservable();\n private sharedLibraryProjectsSource = new Subject();\n public sharedLibraryProjectsSource$ = this.sharedLibraryProjectsSource.asObservable();\n private newProjectSource = new BehaviorSubject(null);\n public newProjectSource$ = this.newProjectSource.asObservable();\n public numberOfPublicProjectsVisible = new BehaviorSubject(0);\n public numberOfPublicProjectsVisible$ = this.numberOfPublicProjectsVisible.asObservable();\n public numberOfPersonalProjectsVisible = new BehaviorSubject(0);\n public numberOfPersonalProjectsVisible$ = this.numberOfPersonalProjectsVisible.asObservable();\n\n constructor(\n private http: HttpClient,\n private router: Router\n ) {}\n\n getOfficialLibraryProjects(): void {\n this.http.get(this.libraryGroupsUrl).subscribe((libraryGroups) => {\n const projects: LibraryProject[] = [];\n this.libraryGroups = this.convertLibraryGroups(libraryGroups);\n for (let group of this.libraryGroups) {\n this.populateProjects(group, projects);\n }\n projects.forEach((project) => (project.metadata.publicUnitType = 'wiseTested'));\n this.officialLibraryProjectsSource.next(projects);\n this.libraryGroupsSource.next(this.libraryGroups);\n });\n }\n\n convertLibraryGroups(libraryGroups: LibraryGroup[]) {\n const convertedLibraryGroups: LibraryGroup[] = [];\n for (let libraryGroup of libraryGroups) {\n convertedLibraryGroups.push(this.convertLibraryGroup(libraryGroup));\n }\n return convertedLibraryGroups;\n }\n\n convertLibraryGroup(libraryObj: any) {\n if (libraryObj.type === 'project') {\n return new LibraryProject(libraryObj);\n } else if (libraryObj.type === 'group') {\n const children = libraryObj.children;\n const convertedLibraryGroup = [];\n for (let child of children) {\n convertedLibraryGroup.push(this.convertLibraryGroup(child));\n }\n libraryObj.children = convertedLibraryGroup;\n return libraryObj;\n }\n }\n\n getCommunityLibraryProjects(): void {\n this.http.get(this.communityProjectsUrl).subscribe((projects) => {\n const communityProjects: LibraryProject[] = this.convertToLibraryProjects(projects);\n communityProjects.forEach((project) => (project.metadata.publicUnitType = 'communityBuilt'));\n this.communityLibraryProjectsSource.next(communityProjects);\n });\n }\n\n getPersonalLibraryProjects() {\n this.http.get(this.personalProjectsUrl).subscribe((projects) => {\n const personalLibraryProjects: LibraryProject[] = this.convertToLibraryProjects(projects);\n this.personalLibraryProjectsSource.next(personalLibraryProjects);\n });\n }\n\n getSharedLibraryProjects() {\n this.http.get(this.sharedProjectsUrl).subscribe((projects) => {\n const sharedLibraryProjects: LibraryProject[] = this.convertToLibraryProjects(projects);\n for (let sharedLibraryProject of sharedLibraryProjects) {\n sharedLibraryProject.shared = true;\n }\n this.sharedLibraryProjectsSource.next(sharedLibraryProjects);\n });\n }\n\n convertToLibraryProjects(projectsJSON) {\n const libraryProjects: LibraryProject[] = [];\n for (let project of projectsJSON) {\n const libraryProject = new LibraryProject(project);\n libraryProjects.push(libraryProject);\n }\n return libraryProjects;\n }\n\n populateProjects(item: any, projects: LibraryProject[]): void {\n if (item.type === 'project') {\n item.visible = true;\n projects.push(item);\n } else if (item.type === 'group') {\n let children = item.children;\n for (let child of children) {\n this.populateProjects(child, projects);\n }\n }\n }\n\n copyProject(projectId) {\n const headers = new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded');\n let body = new HttpParams();\n body = body.set('projectId', projectId + '');\n return this.http.post(this.copyProjectUrl, body, { headers: headers });\n }\n\n addPersonalLibraryProject(project: LibraryProject) {\n this.newProjectSource.next(project);\n this.router.navigate(['/curriculum/personal'], { state: { newProjectId: project.id } });\n }\n\n getProjectInfo(projectId): Observable {\n return this.http.get(this.projectInfoUrl + '/' + projectId);\n }\n\n updateNumberOfPublicProjectsVisible(count) {\n this.numberOfPublicProjectsVisible.next(count);\n }\n\n updateNumberOfPersonalProjectsVisible(count) {\n this.numberOfPersonalProjectsVisible.next(count);\n }\n\n clearAll(): void {\n this.libraryGroupsSource.next([]);\n this.officialLibraryProjectsSource.next([]);\n this.communityLibraryProjectsSource.next([]);\n this.personalLibraryProjectsSource.next([]);\n this.sharedLibraryProjectsSource.next([]);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "router",
+ "type": "Router",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 33,
+ "jsdoctags": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "router",
+ "type": "Router",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "MatchService",
+ "id": "injectable-MatchService-f071be6cd7a5e622642ae43817e5f3b6e0f769607f98379fa802d25176d8453c808c74bec43ba33594bca30bab564cfda75a70522c223d198bc0ca853c542f8f",
+ "file": "src/assets/wise5/components/match/matchService.ts",
+ "properties": [
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "MatchContent",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 50,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "MatchContent",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 37,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 11,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 7,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 22,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "setItemStatus",
+ "args": [
+ {
+ "name": "item",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "hasCorrectAnswer",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 56,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "item",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "hasCorrectAnswer",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3953,
+ "end": 3967,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3947,
+ "end": 3952,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3994,
+ "end": 4000,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n",
+ "returnType": "string"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { ComponentService } from '../componentService';\nimport { Injectable } from '@angular/core';\nimport { MatchContent } from './MatchContent';\n\n@Injectable()\nexport class MatchService extends ComponentService {\n getComponentTypeLabel(): string {\n return $localize`Match`;\n }\n\n createComponent() {\n const component: any = super.createComponent();\n component.type = 'Match';\n component.choices = [];\n component.choiceReuseEnabled = false;\n component.buckets = [];\n component.feedback = [{ bucketId: '0', choices: [] }];\n component.ordered = false;\n return component;\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any) {\n if (componentStates && componentStates.length > 0) {\n const isSubmitRequired = this.isSubmitRequired(node, component);\n for (const componentState of componentStates) {\n const buckets = componentState.studentData.buckets;\n if (buckets && buckets.length > 0) {\n if (!isSubmitRequired || (isSubmitRequired && componentState.isSubmit)) {\n return true;\n }\n }\n }\n }\n return false;\n }\n\n componentStateHasStudentWork(componentState: any, componentContent: any) {\n if (componentState != null) {\n const buckets = componentState.studentData.buckets;\n for (const bucket of buckets) {\n const items = bucket.items;\n if (items != null && items.length > 0) {\n return true;\n }\n }\n }\n return false;\n }\n\n componentHasCorrectAnswer(component: MatchContent): boolean {\n return component.feedback.some((feedback) =>\n feedback.choices.some((choice) => choice.isCorrect)\n );\n }\n\n setItemStatus(item: any, hasCorrectAnswer: boolean): void {\n item.status = '';\n if (item.isCorrect) {\n item.status = 'correct';\n } else if (item.isIncorrectPosition) {\n item.status = 'warn';\n } else if (hasCorrectAnswer && !item.isCorrect && !item.isIncorrectPosition) {\n item.status = 'incorrect';\n }\n }\n}\n",
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "MathService",
+ "id": "injectable-MathService-aa8d39ef2650b2add7523f8cc5560526ce9e3adc045195f6c0f58117e8c3e58beb7419ddc00dd019539a582bb80422c24ffe96de0b24888e042e05ba8b070d0b",
+ "file": "src/app/math/math.service.ts",
+ "properties": [
+ {
+ "name": "mathJax",
+ "defaultValue": "{\n id: 'MathJaxScript',\n source: 'mathjax/es5/tex-mml-chtml.js'\n }",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "MathJaxConfig",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 26,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "signal",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 25,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "ready",
+ "args": [],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 55,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "registerMathJaxAsync",
+ "args": [
+ {
+ "name": "config",
+ "type": "MathJaxConfig",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 41,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123,
+ 134
+ ],
+ "jsdoctags": [
+ {
+ "name": "config",
+ "type": "MathJaxConfig",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "renderPage",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 59,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\nimport { NodeService } from '../../assets/wise5/services/nodeService';\n\ninterface MathJaxConfig {\n id: string;\n source: string;\n}\n\ndeclare global {\n interface Window {\n MathJax: {\n typesetPromise: () => void;\n startup: {\n promise: Promise;\n };\n };\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MathService {\n private signal: Subject;\n private mathJax: MathJaxConfig = {\n id: 'MathJaxScript',\n source: 'mathjax/es5/tex-mml-chtml.js'\n };\n\n constructor(private nodeService: NodeService) {\n this.signal = new ReplaySubject();\n void this.registerMathJaxAsync(this.mathJax)\n .then(() => {\n this.signal.next(true);\n })\n .catch((error) => console.error(error));\n this.nodeService.doneRenderingComponent$.subscribe(() => this.renderPage());\n }\n\n private async registerMathJaxAsync(config: MathJaxConfig): Promise {\n return new Promise((resolve: any, reject) => {\n const script: HTMLScriptElement = document.createElement('script');\n script.id = config.id;\n script.type = 'text/javascript';\n script.src = config.source;\n script.crossOrigin = 'anonymous';\n script.async = true;\n script.onload = () => resolve();\n script.onerror = (error) => reject(error);\n document.head.appendChild(script);\n });\n }\n\n ready(): Observable {\n return this.signal;\n }\n\n private renderPage(): void {\n window.MathJax.startup.promise.then(() => {\n window.MathJax.typesetPromise();\n });\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "nodeService",
+ "type": "NodeService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 29,
+ "jsdoctags": [
+ {
+ "name": "nodeService",
+ "type": "NodeService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "MilestoneReportService",
+ "id": "injectable-MilestoneReportService-71808bec3d15171ac8299a234a503db27fa2bc49f817fbe805efd57e32881943a801db6eb5ea84a096d485a2f5f24b07f8a6da9c48666339e8bbcfa795252229",
+ "file": "src/assets/wise5/services/milestoneReportService.ts",
+ "properties": [
+ {
+ "name": "milestoneCriteriaEvaluator",
+ "defaultValue": "new MilestoneCriteriaEvaluator()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "addAggregateDataBySubScoreId",
+ "args": [
+ {
+ "name": "aggregateDataBySubScoreId",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "subScoreId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "aggregateData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "stepTitle",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 280,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "aggregateDataBySubScoreId",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "subScoreId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "aggregateData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "stepTitle",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "addDataToAggregate",
+ "args": [
+ {
+ "name": "aggregate",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 164,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "aggregate",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "annotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "adjustKIScore",
+ "args": [
+ {
+ "name": "scoreValue",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 139,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "scoreValue",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "calculateAggregateAutoScores",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 70,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "chooseTemplate",
+ "args": [
+ {
+ "name": "templates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "aggregateAutoScores",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 222,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "templates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "aggregateAutoScores",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "generate",
+ "args": [
+ {
+ "name": "projectAchievement",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 17,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "projectAchievement",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAggregateDataBySubScoreId",
+ "args": [
+ {
+ "name": "componentAggregateAutoScores",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 261,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentAggregateAutoScores",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAllLatestScoreAnnotations",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Annotation[]",
+ "typeParameters": [],
+ "line": 101,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getComponentAggregateAutoScore",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "report",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 50,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "report",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getComponentAggregateAutoScores",
+ "args": [
+ {
+ "name": "projectAchievement",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 36,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "projectAchievement",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getCustomScoreValueCounts",
+ "args": [
+ {
+ "name": "scoreValues",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 196,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "scoreValues",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getKIScoreBounds",
+ "args": [
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{ min: number; max: number; }",
+ "typeParameters": [],
+ "line": 152,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getPossibleScoreValueCounts",
+ "args": [
+ {
+ "name": "subScoreId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{ 1: number; 2: number; 3: number; 4: number; 5: number; } | { 1: number; 2: number; 3: number; 4?: undefined; 5?: undefined; }",
+ "typeParameters": [],
+ "line": 204,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "subScoreId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "injectAdditionalFieldsIntoAggregateData",
+ "args": [
+ {
+ "name": "aggregateData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "stepTitle",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 295,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "aggregateData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "stepTitle",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isTemplateMatch",
+ "args": [
+ {
+ "name": "template",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "aggregateAutoScores",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 233,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "template",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "aggregateAutoScores",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "mergeAutoScoreAndTeacherScore",
+ "args": [
+ {
+ "name": "autoScoreAnnotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "teacherScoreAnnotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 124,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "autoScoreAnnotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "teacherScoreAnnotation",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "processMilestoneGraphsAndData",
+ "args": [
+ {
+ "name": "content",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentAggregateAutoScores",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 247,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "content",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentAggregateAutoScores",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setupAggregateSubScore",
+ "args": [
+ {
+ "name": "subScoreId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{ scoreSum: number; scoreCount: number; counts: {}; average: number; }",
+ "typeParameters": [],
+ "line": 181,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "subScoreId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "reportSettings",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { AnnotationService } from './annotationService';\nimport { ProjectService } from './projectService';\nimport { MilestoneCriteriaEvaluator } from '../classroomMonitor/milestones/milestoneCriteriaEvaluator';\nimport { Annotation } from '../common/Annotation';\nimport { isMatchingPeriods } from '../common/period/period';\n\n@Injectable()\nexport class MilestoneReportService {\n private milestoneCriteriaEvaluator = new MilestoneCriteriaEvaluator();\n\n constructor(\n private annotationService: AnnotationService,\n private projectService: ProjectService\n ) {}\n\n generate(projectAchievement: any, periodId: number): any {\n const componentAggregateAutoScores = this.getComponentAggregateAutoScores(\n projectAchievement,\n periodId\n );\n const template = this.chooseTemplate(\n projectAchievement.report.templates,\n componentAggregateAutoScores\n );\n let content = template.content ? template.content : '';\n if (content) {\n content = this.processMilestoneGraphsAndData(content, componentAggregateAutoScores);\n }\n return {\n content: content,\n recommendations: template.recommendations ? template.recommendations : ''\n };\n }\n\n private getComponentAggregateAutoScores(projectAchievement: any, periodId: number): any[] {\n const componentAggregateAutoScores = [];\n for (const referencedComponent of projectAchievement.report.locations) {\n const componentAggregateAutoScore = this.getComponentAggregateAutoScore(\n referencedComponent.nodeId,\n referencedComponent.componentId,\n periodId,\n projectAchievement.report\n );\n componentAggregateAutoScores.push(componentAggregateAutoScore);\n }\n return componentAggregateAutoScores;\n }\n\n private getComponentAggregateAutoScore(\n nodeId: string,\n componentId: string,\n periodId: number,\n report: any\n ): any {\n const aggregateAutoScore: any = this.calculateAggregateAutoScores(\n nodeId,\n componentId,\n periodId,\n report\n );\n return {\n nodeId: nodeId,\n componentId: componentId,\n stepTitle: this.projectService.getNodePositionAndTitle(nodeId),\n aggregateAutoScore: aggregateAutoScore\n };\n }\n\n calculateAggregateAutoScores(\n nodeId: string,\n componentId: string,\n periodId: number,\n reportSettings: any\n ) {\n const aggregate = {};\n const scoreAnnotations = this.getAllLatestScoreAnnotations(nodeId, componentId, periodId);\n for (const scoreAnnotation of scoreAnnotations) {\n if (scoreAnnotation.type === 'autoScore') {\n this.addDataToAggregate(aggregate, scoreAnnotation, reportSettings);\n } else {\n const autoScoreAnnotation = this.annotationService.getLatestScoreAnnotation(\n nodeId,\n componentId,\n scoreAnnotation.toWorkgroupId,\n 'autoScore'\n );\n if (autoScoreAnnotation) {\n const mergedAnnotation = this.mergeAutoScoreAndTeacherScore(\n autoScoreAnnotation,\n scoreAnnotation,\n reportSettings\n );\n this.addDataToAggregate(aggregate, mergedAnnotation, reportSettings);\n }\n }\n }\n return aggregate;\n }\n\n private getAllLatestScoreAnnotations(\n nodeId: string,\n componentId: string,\n periodId: number\n ): Annotation[] {\n return this.annotationService\n .getAnnotationsByNodeIdComponentId(nodeId, componentId)\n .filter(\n (annotation) =>\n isMatchingPeriods(annotation.periodId, periodId) &&\n ['autoScore', 'score'].includes(annotation.type)\n )\n .reduceRight(\n (latestAnnotations, annotation) =>\n latestAnnotations.some(\n (latestAnnotation) => latestAnnotation.toWorkgroupId === annotation.toWorkgroupId\n )\n ? latestAnnotations\n : latestAnnotations.concat(annotation),\n []\n );\n }\n\n private mergeAutoScoreAndTeacherScore(\n autoScoreAnnotation: any,\n teacherScoreAnnotation: any,\n reportSettings: any\n ) {\n if (autoScoreAnnotation.data.scores) {\n for (const subScore of autoScoreAnnotation.data.scores) {\n if (subScore.id === 'ki') {\n subScore.score = this.adjustKIScore(teacherScoreAnnotation.data.value, reportSettings);\n }\n }\n }\n return autoScoreAnnotation;\n }\n\n adjustKIScore(scoreValue: number, reportSettings: any) {\n const teacherScore = Math.round(scoreValue);\n const kiScoreBounds = this.getKIScoreBounds(reportSettings);\n let score = teacherScore;\n if (teacherScore > kiScoreBounds.max) {\n score = kiScoreBounds.max;\n }\n if (teacherScore < kiScoreBounds.min) {\n score = kiScoreBounds.min;\n }\n return score;\n }\n\n getKIScoreBounds(reportSettings: any) {\n const bounds = {\n min: 1,\n max: 5\n };\n if (reportSettings.customScoreValues && reportSettings.customScoreValues['ki']) {\n bounds.min = Math.min(...reportSettings.customScoreValues['ki']);\n bounds.max = Math.max(...reportSettings.customScoreValues['ki']);\n }\n return bounds;\n }\n\n addDataToAggregate(aggregate: any, annotation: any, reportSettings: any) {\n for (const subScore of annotation.data.scores) {\n if (aggregate[subScore.id] == null) {\n aggregate[subScore.id] = this.setupAggregateSubScore(subScore.id, reportSettings);\n }\n const subScoreVal = subScore.score;\n if (aggregate[subScore.id].counts[subScoreVal] > -1) {\n aggregate[subScore.id].counts[subScoreVal]++;\n aggregate[subScore.id].scoreSum += subScoreVal;\n aggregate[subScore.id].scoreCount++;\n aggregate[subScore.id].average =\n aggregate[subScore.id].scoreSum / aggregate[subScore.id].scoreCount;\n }\n }\n return aggregate;\n }\n\n setupAggregateSubScore(subScoreId: string, reportSettings: any) {\n let counts = {};\n if (reportSettings.customScoreValues && reportSettings.customScoreValues[subScoreId]) {\n counts = this.getCustomScoreValueCounts(reportSettings.customScoreValues[subScoreId]);\n } else {\n counts = this.getPossibleScoreValueCounts(subScoreId);\n }\n return {\n scoreSum: 0,\n scoreCount: 0,\n counts: counts,\n average: 0\n };\n }\n\n getCustomScoreValueCounts(scoreValues: any[]) {\n let counts = {};\n for (const value of scoreValues) {\n counts[value] = 0;\n }\n return counts;\n }\n\n getPossibleScoreValueCounts(subScoreId: string) {\n if (subScoreId === 'ki') {\n return {\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 0\n };\n } else {\n return {\n 1: 0,\n 2: 0,\n 3: 0\n };\n }\n }\n\n chooseTemplate(templates: any[], aggregateAutoScores: any[]) {\n for (const template of templates) {\n if (this.isTemplateMatch(template, aggregateAutoScores)) {\n return template;\n }\n }\n return {\n content: null\n };\n }\n\n isTemplateMatch(template: any, aggregateAutoScores: any[]): boolean {\n const matchedCriteria = [];\n for (const satisfyCriterion of template.satisfyCriteria) {\n if (this.milestoneCriteriaEvaluator.isSatisfied(satisfyCriterion, aggregateAutoScores)) {\n matchedCriteria.push(satisfyCriterion);\n }\n }\n if (template.satisfyConditional === 'all') {\n return matchedCriteria.length === template.satisfyCriteria.length;\n } else if (template.satisfyConditional === 'any') {\n return matchedCriteria.length > 0;\n }\n }\n\n processMilestoneGraphsAndData(content: any, componentAggregateAutoScores: any): string {\n const aggregateDataBySubScoreId = this.getAggregateDataBySubScoreId(\n componentAggregateAutoScores\n );\n for (const [subScoreId, subScoreData] of Object.entries(aggregateDataBySubScoreId)) {\n const data = JSON.stringify(subScoreData).replace(/\\\"/g, \"'\");\n const graphRegex = new RegExp(`milestone-report-graph{1,} id=\"(${subScoreId})\"`, 'g');\n content = content.replace(graphRegex, `$& data=\\\"${data}\\\"`);\n const dataRegex = new RegExp(`milestone-report-data{1,} score-id=\"(${subScoreId})\"`, 'g');\n content = content.replace(dataRegex, `$& data=\\\"${data}\\\"`);\n }\n return content;\n }\n\n private getAggregateDataBySubScoreId(componentAggregateAutoScores: any[]): any {\n const aggregateDataBySubScoreId = {};\n for (const componentAggregateAutoScore of componentAggregateAutoScores) {\n const aggregateAutoScore = componentAggregateAutoScore.aggregateAutoScore;\n for (const subScoreId of Object.keys(aggregateAutoScore)) {\n const aggregateData = aggregateAutoScore[subScoreId];\n this.addAggregateDataBySubScoreId(\n aggregateDataBySubScoreId,\n subScoreId,\n aggregateData,\n componentAggregateAutoScore.nodeId,\n componentAggregateAutoScore.componentId,\n componentAggregateAutoScore.stepTitle\n );\n }\n }\n return aggregateDataBySubScoreId;\n }\n\n private addAggregateDataBySubScoreId(\n aggregateDataBySubScoreId: any,\n subScoreId: string,\n aggregateData: any,\n nodeId: string,\n componentId: string,\n stepTitle: string\n ): void {\n if (aggregateDataBySubScoreId[subScoreId] == null) {\n aggregateDataBySubScoreId[subScoreId] = [];\n }\n this.injectAdditionalFieldsIntoAggregateData(aggregateData, nodeId, componentId, stepTitle);\n aggregateDataBySubScoreId[subScoreId].push(aggregateData);\n }\n\n private injectAdditionalFieldsIntoAggregateData(\n aggregateData: any,\n nodeId: string,\n componentId: string,\n stepTitle: string\n ): any {\n aggregateData.nodeId = nodeId;\n aggregateData.componentId = componentId;\n aggregateData.stepTitle = stepTitle;\n return aggregateData;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "annotationService",
+ "type": "AnnotationService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 10,
+ "jsdoctags": [
+ {
+ "name": "annotationService",
+ "type": "AnnotationService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "MilestoneService",
+ "id": "injectable-MilestoneService-fe9a1f9de016bd8a7fe747a82bea5d429af74faf2749d22b3f4b59bedabec1ee789548e199ce1fc77dfe6b1c6fe5e2353e21c9babcee646cb50a63221e2d917c",
+ "file": "src/assets/wise5/services/milestoneService.ts",
+ "properties": [
+ {
+ "name": "numberOfStudentsInRun",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "number",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14
+ },
+ {
+ "name": "periodId",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15
+ },
+ {
+ "name": "projectMilestones",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16
+ },
+ {
+ "name": "workgroupIds",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "any[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 17
+ }
+ ],
+ "methods": [
+ {
+ "name": "getMilestoneReport",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 37,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getProjectMilestoneReports",
+ "args": [],
+ "optional": false,
+ "returnType": "Milestone[]",
+ "typeParameters": [],
+ "line": 47,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "getProjectMilestones",
+ "args": [],
+ "optional": false,
+ "returnType": "Milestone[]",
+ "typeParameters": [],
+ "line": 27,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getProjectMilestoneStatus",
+ "args": [
+ {
+ "name": "milestoneId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 51,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "milestoneId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getReferencedComponent",
+ "args": [
+ {
+ "name": "milestone",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "milestone",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getSatisfyCriteriaReferencedComponents",
+ "args": [
+ {
+ "name": "projectAchievement",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 168,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "projectAchievement",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "insertMilestoneCompletion",
+ "args": [
+ {
+ "name": "milestone",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 75,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "milestone",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "insertMilestoneItems",
+ "args": [
+ {
+ "name": "milestone",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 63,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "milestone",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "insertMilestoneReport",
+ "args": [
+ {
+ "name": "milestone",
+ "type": "Milestone",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Milestone",
+ "typeParameters": [],
+ "line": 140,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "milestone",
+ "type": "Milestone",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCompletionReached",
+ "args": [
+ {
+ "name": "projectAchievement",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 161,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "projectAchievement",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setWorkgroupsInCurrentPeriod",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 129,
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "'use strict';\n\nimport { AchievementService } from './achievementService';\nimport { ConfigService } from './configService';\nimport { ProjectService } from './projectService';\nimport { TeacherDataService } from './teacherDataService';\nimport { Injectable } from '@angular/core';\nimport { copy } from '../common/object/object';\nimport { MilestoneReportService } from './milestoneReportService';\nimport { Milestone } from '../../../app/domain/milestone';\n\n@Injectable()\nexport class MilestoneService {\n numberOfStudentsInRun: number;\n periodId: any;\n projectMilestones: any[];\n workgroupIds: any[];\n\n constructor(\n private achievementService: AchievementService,\n private configService: ConfigService,\n private dataService: TeacherDataService,\n private milestoneReportService: MilestoneReportService,\n private projectService: ProjectService\n ) {}\n\n getProjectMilestones(): Milestone[] {\n const achievements = this.projectService.getAchievements();\n if (achievements.isEnabled) {\n return achievements.items.filter((achievement) => {\n return ['milestone', 'milestoneReport'].includes(achievement.type);\n });\n }\n return [];\n }\n\n getMilestoneReport(nodeId: string, componentId: string): any {\n const milestoneReport = this.getProjectMilestoneReports().find((report) => {\n const referencedComponent = this.getReferencedComponent(report);\n return (\n referencedComponent.nodeId === nodeId && referencedComponent.componentId === componentId\n );\n });\n return milestoneReport ? this.getProjectMilestoneStatus(milestoneReport.id) : null;\n }\n\n private getProjectMilestoneReports(): Milestone[] {\n return this.getProjectMilestones().filter((milestone) => milestone.type === 'milestoneReport');\n }\n\n getProjectMilestoneStatus(milestoneId: string): any {\n this.periodId = this.dataService.getCurrentPeriod().periodId;\n this.setWorkgroupsInCurrentPeriod();\n let milestone = this.projectService.getAchievementByAchievementId(milestoneId);\n milestone = this.insertMilestoneItems(milestone);\n milestone = this.insertMilestoneCompletion(milestone);\n if (milestone.type === 'milestoneReport') {\n milestone = this.insertMilestoneReport(milestone);\n }\n return milestone;\n }\n\n insertMilestoneItems(milestone: any): any {\n milestone.items = copy(this.projectService.idToOrder);\n if (milestone.params != null && milestone.params.nodeIds != null) {\n for (const nodeId of milestone.params.nodeIds) {\n if (milestone.items[nodeId] != null) {\n milestone.items[nodeId].checked = true;\n }\n }\n }\n return milestone;\n }\n\n insertMilestoneCompletion(milestone: any): any {\n const achievementIdToStudentAchievements =\n this.achievementService.getAchievementIdToStudentAchievementsMappings();\n const studentAchievements = achievementIdToStudentAchievements[milestone.id];\n const workgroupIdsCompleted = [];\n const achievementTimes = [];\n const workgroupIdsNotCompleted = [];\n\n for (const studentAchievement of studentAchievements) {\n const currentWorkgroupId = studentAchievement.workgroupId;\n if (this.workgroupIds.indexOf(currentWorkgroupId) > -1) {\n workgroupIdsCompleted.push(currentWorkgroupId);\n achievementTimes.push(studentAchievement.achievementTime);\n }\n }\n\n for (const workgroupId of this.workgroupIds) {\n if (workgroupIdsCompleted.indexOf(workgroupId) === -1) {\n workgroupIdsNotCompleted.push(workgroupId);\n }\n }\n\n milestone.workgroups = [];\n\n for (let c = 0; c < workgroupIdsCompleted.length; c++) {\n const workgroupId = workgroupIdsCompleted[c];\n const achievementTime = achievementTimes[c];\n const workgroupObject = {\n workgroupId: workgroupId,\n displayNames: this.configService.getDisplayUsernamesByWorkgroupId(workgroupId),\n achievementTime: achievementTime,\n completed: true\n };\n milestone.workgroups.push(workgroupObject);\n }\n\n for (const workgroupId of workgroupIdsNotCompleted) {\n const workgroupObject = {\n workgroupId: workgroupId,\n displayNames: this.configService.getDisplayUsernamesByWorkgroupId(workgroupId),\n achievementTime: null,\n completed: false\n };\n milestone.workgroups.push(workgroupObject);\n }\n\n milestone.numberOfStudentsCompleted = workgroupIdsCompleted.length;\n milestone.numberOfStudentsInRun = this.numberOfStudentsInRun;\n milestone.percentageCompleted = Math.round(\n (100 * milestone.numberOfStudentsCompleted) / this.numberOfStudentsInRun\n );\n return milestone;\n }\n\n setWorkgroupsInCurrentPeriod(): void {\n this.workgroupIds = [];\n for (const workgroupId of this.configService.getClassmateWorkgroupIds()) {\n const currentPeriodId = this.configService.getPeriodIdByWorkgroupId(workgroupId);\n if (this.periodId === -1 || currentPeriodId === this.periodId) {\n this.workgroupIds.push(workgroupId);\n }\n }\n this.numberOfStudentsInRun = this.workgroupIds.length;\n }\n\n insertMilestoneReport(milestone: Milestone): Milestone {\n const referencedComponent = this.getReferencedComponent(milestone);\n milestone.nodeId = referencedComponent.nodeId;\n milestone.componentId = referencedComponent.componentId;\n if (this.isCompletionReached(milestone)) {\n const report = this.milestoneReportService.generate(milestone, this.periodId);\n milestone.isReportAvailable = true;\n milestone.generatedReport = report.content ? report.content : null;\n milestone.generatedRecommendations = report.recommendations ? report.recommendations : null;\n } else {\n milestone.isReportAvailable = false;\n }\n return milestone;\n }\n\n getReferencedComponent(milestone: any): any {\n const referencedComponents = this.getSatisfyCriteriaReferencedComponents(milestone);\n const referencedComponentValues: any[] = Object.values(referencedComponents);\n return referencedComponentValues[referencedComponentValues.length - 1];\n }\n\n isCompletionReached(projectAchievement: any): boolean {\n return (\n projectAchievement.percentageCompleted >= projectAchievement.satisfyMinPercentage &&\n projectAchievement.numberOfStudentsCompleted >= projectAchievement.satisfyMinNumWorkgroups\n );\n }\n\n getSatisfyCriteriaReferencedComponents(projectAchievement: any): any {\n const components = {};\n const templates = projectAchievement.report.templates;\n for (const template of templates) {\n for (const satisfyCriterion of template.satisfyCriteria) {\n const nodeId = satisfyCriterion.nodeId;\n const componentId = satisfyCriterion.componentId;\n const component = {\n nodeId: nodeId,\n componentId: componentId\n };\n components[nodeId + '_' + componentId] = component;\n }\n }\n return components;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "achievementService",
+ "type": "AchievementService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "dataService",
+ "type": "TeacherDataService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "milestoneReportService",
+ "type": "MilestoneReportService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 17,
+ "jsdoctags": [
+ {
+ "name": "achievementService",
+ "type": "AchievementService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "dataService",
+ "type": "TeacherDataService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "milestoneReportService",
+ "type": "MilestoneReportService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "MockConfigService",
+ "id": "injectable-MockConfigService-ac8f3f25082faa4fe4b20c7f6c730f0404ca18ac0e1cf78551b33d7ba242ba332a4a386945b612a549b32a466db2ef18226c0efe6e822a20b45dfb906d3154db",
+ "file": "src/app/services/test.config.service.ts",
+ "properties": [],
+ "methods": [],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class MockConfigService {}\n",
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "MoveNodesService",
+ "id": "injectable-MoveNodesService-01684e4696a6afd56a6e103e93c708603d937f0e57ff8f4986dec90780ef1e61be8c4a5afbdc48429345aeb34417b9f6a6ada25701e2733523e24d1f6bacc6ad",
+ "file": "src/assets/wise5/services/moveNodesService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "moveFromActiveToInactiveInsertInside",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdToInsertInside",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 77,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nMove the node from active to inside an inactive group\n",
+ "description": "Move the node from active to inside an inactive group
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3013,
+ "end": 3017,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "node"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3007,
+ "end": 3012,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node to move
\n"
+ },
+ {
+ "name": {
+ "pos": 3047,
+ "end": 3067,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeIdToInsertInside"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3041,
+ "end": 3046,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "place the node inside this
\n"
+ }
+ ]
+ },
+ {
+ "name": "moveFromInactiveToInactiveInsertInside",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdToInsertInside",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 134,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nMove the node from inactive to inside an inactive group\n",
+ "description": "Move the node from inactive to inside an inactive group
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 4830,
+ "end": 4834,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "node"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4824,
+ "end": 4829,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node to move
\n"
+ },
+ {
+ "name": {
+ "pos": 4864,
+ "end": 4884,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeIdToInsertInside"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4858,
+ "end": 4863,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "place the node inside this
\n"
+ }
+ ]
+ },
+ {
+ "name": "moveInactiveNodeToInactiveSection",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdToInsertAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 202,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeIdToInsertAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "moveNodesAfter",
+ "args": [
+ {
+ "name": "nodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "moveAfterNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 171,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nMove nodes after a certain node id\n",
+ "description": "Move nodes after a certain node id
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 6336,
+ "end": 6343,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeIds"
+ },
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 6330,
+ "end": 6335,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node ids to move
\n"
+ },
+ {
+ "name": {
+ "pos": 6377,
+ "end": 6392,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "moveAfterNodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 6371,
+ "end": 6376,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id we will put the moved nodes after
\n"
+ }
+ ]
+ },
+ {
+ "name": "moveNodesInsideGroup",
+ "args": [
+ {
+ "name": "nodeIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "groupNodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 17,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nMove nodes inside an active/inactive group node\n",
+ "description": "Move nodes inside an active/inactive group node
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 477,
+ "end": 484,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeIds"
+ },
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 471,
+ "end": 476,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node ids to move
\n"
+ },
+ {
+ "name": {
+ "pos": 518,
+ "end": 529,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "groupNodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 512,
+ "end": 517,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id of the group we are moving the nodes inside
\n"
+ }
+ ]
+ },
+ {
+ "name": "moveToActive",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 119,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nMove the node to the active nodes array. If the node is a group node,\nalso move all of its children to active.\n",
+ "description": "Move the node to the active nodes array. If the node is a group node,\nalso move all of its children to active.
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "moveToInactive",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeIdToInsertAfter",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 161,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nMove an active node to the inactive nodes array.\n",
+ "description": "Move an active node to the inactive nodes array.
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 5990,
+ "end": 5994,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "node"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 5984,
+ "end": 5989,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node to move
\n"
+ },
+ {
+ "name": {
+ "pos": 6024,
+ "end": 6043,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeIdToInsertAfter"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 6018,
+ "end": 6023,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "place the node after this
\n"
+ }
+ ]
+ },
+ {
+ "name": "removeChildNodesFromActiveNodes",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 109,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nMove the child nodes of a group from the active nodes.\n",
+ "description": "Move the child nodes of a group from the active nodes.
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 4115,
+ "end": 4119,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "node"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 4109,
+ "end": 4114,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "The group node.
\n"
+ }
+ ]
+ },
+ {
+ "name": "removeNodeFromActiveNodes",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 88,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nRemove the node from the active nodes.\nIf the node is a group node, also remove its children.\n",
+ "description": "Remove the node from the active nodes.\nIf the node is a group node, also remove its children.
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3450,
+ "end": 3456,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3444,
+ "end": 3449,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node to remove
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3482,
+ "end": 3489,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "the node that was removed
\n"
+ }
+ ]
+ },
+ {
+ "name": "removeNodeFromInactiveGroupNodes",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 236,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "removeNodeFromInactiveNodes",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 207,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "removeNodeFromInactiveStepNodes",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 227,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { TeacherProjectService } from './teacherProjectService';\nimport { RemoveNodeIdFromTransitionsService } from './removeNodeIdFromTransitionsService';\n\n@Injectable()\nexport class MoveNodesService {\n constructor(\n protected projectService: TeacherProjectService,\n private removeNodeIdFromTransitionsService: RemoveNodeIdFromTransitionsService\n ) {}\n\n /**\n * Move nodes inside an active/inactive group node\n * @param nodeIds the node ids to move\n * @param groupNodeId the node id of the group we are moving the nodes inside\n */\n moveNodesInsideGroup(nodeIds: string[], groupNodeId: string): any[] {\n const movedNodes = [];\n for (let n = 0; n < nodeIds.length; n++) {\n const nodeId = nodeIds[n];\n const node = this.projectService.getNodeById(nodeId);\n movedNodes.push(node);\n const movingNodeIsActive = this.projectService.isActive(nodeId);\n const stationaryNodeIsActive = this.projectService.isActive(groupNodeId);\n\n if (movingNodeIsActive && stationaryNodeIsActive) {\n this.removeNodeIdFromTransitionsService.remove(nodeId);\n this.projectService.removeNodeIdFromGroups(nodeId);\n\n if (n == 0) {\n this.projectService.insertNodeInsideOnlyUpdateTransitions(nodeId, groupNodeId);\n this.projectService.insertNodeInsideInGroups(nodeId, groupNodeId);\n } else {\n this.projectService.insertNodeAfterInTransitions(node, groupNodeId);\n this.projectService.insertNodeAfterInGroups(nodeId, groupNodeId);\n }\n } else if (movingNodeIsActive && !stationaryNodeIsActive) {\n this.removeNodeIdFromTransitionsService.remove(nodeId);\n this.projectService.removeNodeIdFromGroups(nodeId);\n\n if (n == 0) {\n this.moveFromActiveToInactiveInsertInside(node, groupNodeId);\n } else {\n this.moveToInactive(node, groupNodeId);\n }\n } else if (!movingNodeIsActive && stationaryNodeIsActive) {\n this.moveToActive(node);\n\n if (n == 0) {\n this.projectService.insertNodeInsideOnlyUpdateTransitions(nodeId, groupNodeId);\n this.projectService.insertNodeInsideInGroups(nodeId, groupNodeId);\n } else {\n this.projectService.insertNodeAfterInTransitions(node, groupNodeId);\n this.projectService.insertNodeAfterInGroups(nodeId, groupNodeId);\n }\n } else if (!movingNodeIsActive && !stationaryNodeIsActive) {\n this.removeNodeIdFromTransitionsService.remove(nodeId);\n this.projectService.removeNodeIdFromGroups(nodeId);\n\n if (n == 0) {\n this.moveFromInactiveToInactiveInsertInside(node, groupNodeId);\n } else {\n this.moveInactiveNodeToInactiveSection(node, groupNodeId);\n }\n }\n // remember the node id so we can put the next node (if any) after this one\n groupNodeId = node.id;\n }\n return movedNodes;\n }\n\n /**\n * Move the node from active to inside an inactive group\n * @param node the node to move\n * @param nodeIdToInsertInside place the node inside this\n */\n private moveFromActiveToInactiveInsertInside(node: any, nodeIdToInsertInside: string): void {\n this.removeNodeFromActiveNodes(node.id);\n this.projectService.addInactiveNodeInsertInside(node, nodeIdToInsertInside);\n }\n\n /**\n * Remove the node from the active nodes.\n * If the node is a group node, also remove its children.\n * @param nodeId the node to remove\n * @returns the node that was removed\n */\n private removeNodeFromActiveNodes(nodeId: string): any {\n let nodeRemoved = null;\n const activeNodes = this.projectService.project.nodes;\n for (let a = 0; a < activeNodes.length; a++) {\n const activeNode = activeNodes[a];\n if (activeNode.id === nodeId) {\n activeNodes.splice(a, 1);\n nodeRemoved = activeNode;\n if (activeNode.type === 'group') {\n this.removeChildNodesFromActiveNodes(activeNode);\n }\n break;\n }\n }\n return nodeRemoved;\n }\n\n /**\n * Move the child nodes of a group from the active nodes.\n * @param node The group node.\n */\n private removeChildNodesFromActiveNodes(node: any): void {\n for (const childId of node.ids) {\n this.removeNodeFromActiveNodes(childId);\n }\n }\n\n /**\n * Move the node to the active nodes array. If the node is a group node,\n * also move all of its children to active.\n */\n private moveToActive(node: any): void {\n this.removeNodeFromInactiveNodes(node.id);\n this.projectService.addNode(node);\n if (this.projectService.isGroupNode(node.id)) {\n for (const childId of node.ids) {\n this.projectService.addNode(this.removeNodeFromInactiveNodes(childId));\n }\n }\n }\n\n /**\n * Move the node from inactive to inside an inactive group\n * @param node the node to move\n * @param nodeIdToInsertInside place the node inside this\n */\n private moveFromInactiveToInactiveInsertInside(node: any, nodeIdToInsertInside: string): void {\n this.removeNodeFromInactiveNodes(node.id);\n if (this.projectService.isGroupNode(node.id)) {\n /*\n * remove the group's child nodes from our data structures so that we can\n * add them back in later\n */\n for (const childId of node.ids) {\n const childNode = this.projectService.getNodeById(childId);\n const inactiveNodesIndex = this.projectService.project.inactiveNodes.indexOf(childNode);\n if (inactiveNodesIndex != -1) {\n this.projectService.project.inactiveNodes.splice(inactiveNodesIndex, 1);\n }\n const inactiveStepNodesIndex = this.projectService.inactiveStepNodes.indexOf(childNode);\n if (inactiveStepNodesIndex != -1) {\n this.projectService.inactiveStepNodes.splice(inactiveStepNodesIndex, 1);\n }\n }\n }\n this.projectService.addInactiveNodeInsertInside(node, nodeIdToInsertInside);\n }\n\n /**\n * Move an active node to the inactive nodes array.\n * @param node the node to move\n * @param nodeIdToInsertAfter place the node after this\n */\n private moveToInactive(node: any, nodeIdToInsertAfter: string): void {\n this.removeNodeFromActiveNodes(node.id);\n this.projectService.addInactiveNodeInsertAfter(node, nodeIdToInsertAfter);\n }\n\n /**\n * Move nodes after a certain node id\n * @param nodeIds the node ids to move\n * @param moveAfterNodeId the node id we will put the moved nodes after\n */\n moveNodesAfter(nodeIds: string[], moveAfterNodeId: string): any[] {\n const movedNodes = [];\n for (let nodeId of nodeIds) {\n const node = this.projectService.getNodeById(nodeId);\n movedNodes.push(node);\n const movingNodeIsActive = this.projectService.isActive(nodeId);\n const stationaryNodeIsActive = this.projectService.isActive(moveAfterNodeId);\n if (movingNodeIsActive && stationaryNodeIsActive) {\n this.removeNodeIdFromTransitionsService.remove(nodeId);\n this.projectService.removeNodeIdFromGroups(nodeId);\n this.projectService.insertNodeAfterInGroups(nodeId, moveAfterNodeId);\n this.projectService.insertNodeAfterInTransitions(node, moveAfterNodeId);\n } else if (movingNodeIsActive && !stationaryNodeIsActive) {\n this.removeNodeIdFromTransitionsService.remove(nodeId);\n this.projectService.removeNodeIdFromGroups(nodeId);\n this.moveToInactive(node, moveAfterNodeId);\n } else if (!movingNodeIsActive && stationaryNodeIsActive) {\n this.moveToActive(node);\n this.projectService.insertNodeAfterInGroups(nodeId, moveAfterNodeId);\n this.projectService.insertNodeAfterInTransitions(node, moveAfterNodeId);\n } else if (!movingNodeIsActive && !stationaryNodeIsActive) {\n this.removeNodeIdFromTransitionsService.remove(nodeId);\n this.projectService.removeNodeIdFromGroups(nodeId);\n this.moveInactiveNodeToInactiveSection(node, moveAfterNodeId);\n }\n // remember the node id so we can put the next node (if any) after this one\n moveAfterNodeId = node.id;\n }\n return movedNodes;\n }\n\n private moveInactiveNodeToInactiveSection(node: any, nodeIdToInsertAfter: string): void {\n this.removeNodeFromInactiveNodes(node.id);\n this.projectService.addInactiveNodeInsertAfter(node, nodeIdToInsertAfter);\n }\n\n private removeNodeFromInactiveNodes(nodeId: string): void {\n let node = null;\n if (this.projectService.getParentGroup(nodeId) != null) {\n this.projectService.removeChildFromParent(nodeId);\n }\n\n const inactiveNodes = this.projectService.project.inactiveNodes;\n for (let i = 0; i < inactiveNodes.length; i++) {\n let inactiveNode = inactiveNodes[i];\n if (inactiveNode.id === nodeId) {\n node = inactiveNode;\n inactiveNodes.splice(i, 1);\n break;\n }\n }\n this.removeNodeFromInactiveStepNodes(nodeId);\n this.removeNodeFromInactiveGroupNodes(nodeId);\n return node;\n }\n\n private removeNodeFromInactiveStepNodes(nodeId: string): void {\n for (let i = 0; i < this.projectService.inactiveStepNodes.length; i++) {\n if (nodeId == this.projectService.inactiveStepNodes[i].id) {\n this.projectService.inactiveStepNodes.splice(i, 1);\n break;\n }\n }\n }\n\n private removeNodeFromInactiveGroupNodes(nodeId: string): void {\n for (let i = 0; i < this.projectService.inactiveGroupNodes.length; i++) {\n if (nodeId == this.projectService.inactiveGroupNodes[i].id) {\n this.projectService.inactiveGroupNodes.splice(i, 1);\n break;\n }\n }\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "removeNodeIdFromTransitionsService",
+ "type": "RemoveNodeIdFromTransitionsService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 6,
+ "jsdoctags": [
+ {
+ "name": "projectService",
+ "type": "TeacherProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "removeNodeIdFromTransitionsService",
+ "type": "RemoveNodeIdFromTransitionsService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "MultipleChoiceService",
+ "id": "injectable-MultipleChoiceService-6e22ee3cc37a2b8b1c694bbe5a6d5408dfd616d60924a42878960274e4f7f2fde5200cfde52c41c664546260ad31ddc2861256c1c8d3882a58f065125665921d",
+ "file": "src/assets/wise5/components/multipleChoice/multipleChoiceService.ts",
+ "properties": [
+ {
+ "name": "notifyConnectedComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSource$",
+ "defaultValue": "this.notifyConnectedComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentStateSource$",
+ "defaultValue": "this.requestComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentStateSource$",
+ "defaultValue": "this.sendComponentStateSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14,
+ "modifierKind": [
+ 125
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "methods": [
+ {
+ "name": "choiceChosen",
+ "args": [
+ {
+ "name": "criteria",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 33,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nReturns true iff the student chose a choice specified in the criteria\ncriteria object\n",
+ "description": "Returns true iff the student chose a choice specified in the criteria\ncriteria object
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 970,
+ "end": 978,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "criteria"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 964,
+ "end": 969,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the criteria object
\n"
+ },
+ {
+ "name": {
+ "pos": 1011,
+ "end": 1025,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1005,
+ "end": 1010,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "contains student's last choice
\n"
+ },
+ {
+ "tagName": {
+ "pos": 1063,
+ "end": 1070,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "a boolean value whether the student chose the choice specified in the\ncriteria object
\n"
+ }
+ ]
+ },
+ {
+ "name": "componentHasCorrectAnswer",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 99,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentStateHasStudentWork",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 86,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentContent",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "createComponent",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 13,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getComponentTypeLabel",
+ "args": [],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 9,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getStudentChoicesFromComponentState",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 64,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getStudentDataString",
+ "args": [
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 73,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet the human readable student data string\n",
+ "description": "Get the human readable student data string
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2570,
+ "end": 2584,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentState"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2564,
+ "end": 2569,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component state
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2611,
+ "end": 2617,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "a human readable student data string
\n"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isChoicesSelected",
+ "args": [
+ {
+ "name": "studentChoiceIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "constraintChoiceIds",
+ "type": "string | string[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "studentChoiceIds",
+ "type": "string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "constraintChoiceIds",
+ "type": "string | string[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isCompleted",
+ "args": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 47,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentStates",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentHasWork",
+ "args": [
+ {
+ "name": "component",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 105,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.\n",
+ "description": "Whether this component generates student work\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 3060,
+ "end": 3069,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "component"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 3054,
+ "end": 3059,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "(optional) the component object. if the component object\nis not provided, we will use the default value of whether the\ncomponent type usually has work.
\n"
+ },
+ {
+ "tagName": {
+ "pos": 3238,
+ "end": 3244,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component generates student work
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSaveButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 135,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a save button\n",
+ "description": "Whether this component uses a save button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4173,
+ "end": 4179,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a save button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "componentUsesSubmitButton",
+ "args": [],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 143,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nWhether this component uses a submit button\n",
+ "description": "Whether this component uses a submit button
\n",
+ "jsdoctags": [
+ {
+ "tagName": {
+ "pos": 4351,
+ "end": 4357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "return"
+ },
+ "comment": "whether this component uses a submit button
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "displayAnnotation",
+ "args": [
+ {
+ "name": "componentContent",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "annotation",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 94,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCheck if we need to display the annotation to the student\n",
+ "description": "Check if we need to display the annotation to the student
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 2753,
+ "end": 2769,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentContent"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2747,
+ "end": 2752,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the component content
\n"
+ },
+ {
+ "name": {
+ "pos": 2804,
+ "end": 2814,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "annotation"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 2798,
+ "end": 2803,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the annotation
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2836,
+ "end": 2843,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "whether we need to display the annotation to the student
\n",
+ "returnType": "boolean"
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getDomIdEnding",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 18,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "getElementId",
+ "args": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "domIdBeginning",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "domIdEnding",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "hasNodeEnteredEvent",
+ "args": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 155,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeEvents",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "isSubmitRequired",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 151,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "component",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "notifyConnectedComponentSubscribers",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 42,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentState",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "requestComponentState",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 30,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "componentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isSubmit",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "false",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ },
+ {
+ "name": "sendComponentState",
+ "args": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "componentStateWrapper",
+ "type": "ComponentStateWrapper",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ],
+ "inheritance": {
+ "file": "ComponentService"
+ }
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { ComponentService } from '../componentService';\nimport { Injectable } from '@angular/core';\nimport { arraysContainSameValues } from '../../common/array/array';\nimport { Choice } from './Choice';\nimport { generateRandomKey } from '../../common/string/string';\n\n@Injectable()\nexport class MultipleChoiceService extends ComponentService {\n getComponentTypeLabel(): string {\n return $localize`Multiple Choice`;\n }\n\n createComponent(): any {\n const component: any = super.createComponent();\n component.type = 'MultipleChoice';\n component.prompt = $localize`Choose an option from below`;\n component.choiceType = 'radio';\n component.choices = [\n new Choice(generateRandomKey(), $localize`Choice 1`, false, ''),\n new Choice(generateRandomKey(), $localize`Choice 2`, false, '')\n ];\n component.showFeedback = true;\n return component;\n }\n\n /**\n * Returns true iff the student chose a choice specified in the criteria\n * @param criteria the criteria object\n * @param componentState contains student's last choice\n * @returns a boolean value whether the student chose the choice specified in the\n * criteria object\n */\n choiceChosen(criteria: any, componentState: any): boolean {\n const studentChoiceIds = componentState.studentData.studentChoices.map((choice) => choice.id);\n return this.isChoicesSelected(studentChoiceIds, criteria.params.choiceIds);\n }\n\n private isChoicesSelected(\n studentChoiceIds: string[],\n constraintChoiceIds: string | string[]\n ): boolean {\n return constraintChoiceIds instanceof Array\n ? arraysContainSameValues(studentChoiceIds, constraintChoiceIds)\n : studentChoiceIds.includes(constraintChoiceIds);\n }\n\n isCompleted(component: any, componentStates: any[], nodeEvents: any[], node: any) {\n if (componentStates && componentStates.length) {\n const isSubmitRequired = this.isSubmitRequired(node, component);\n for (let c = componentStates.length - 1; c >= 0; c--) {\n const componentState = componentStates[c];\n const studentChoices = this.getStudentChoicesFromComponentState(componentState);\n if (\n studentChoices != null &&\n (!isSubmitRequired || (isSubmitRequired && componentState.isSubmit))\n ) {\n return true;\n }\n }\n }\n return false;\n }\n\n private getStudentChoicesFromComponentState(componentState: any): any[] {\n return componentState.studentData ? componentState.studentData.studentChoices : [];\n }\n\n /**\n * Get the human readable student data string\n * @param componentState the component state\n * @return a human readable student data string\n */\n getStudentDataString(componentState: any) {\n if (componentState != null) {\n const studentData = componentState.studentData;\n if (studentData != null) {\n const studentChoices = studentData.studentChoices;\n if (studentChoices != null) {\n return studentChoices.map((studentChoice) => studentChoice.text).join(', ');\n }\n }\n }\n return '';\n }\n\n componentStateHasStudentWork(componentState: any, componentContent: any) {\n if (componentState != null) {\n const studentData = componentState.studentData;\n if (studentData != null) {\n const studentChoices = studentData.studentChoices;\n if (studentChoices != null && studentChoices.length > 0) {\n return true;\n }\n }\n }\n return false;\n }\n\n componentHasCorrectAnswer(component: any): boolean {\n return component.choices.some((choice) => choice.isCorrect);\n }\n}\n",
+ "extends": [
+ "ComponentService"
+ ],
+ "type": "injectable"
+ },
+ {
+ "name": "NewsService",
+ "id": "injectable-NewsService-c4dea931ce4d827b593445c125cfd948a48b63f11bcffd3c9d99bae797a48bf7ac8fb706b350d00806bbd23b316a7ce572c0794527c8739ea25bc442850926e5",
+ "file": "src/app/services/news.service.ts",
+ "properties": [
+ {
+ "name": "newsUrl",
+ "defaultValue": "'/api/news'",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "string",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "getAllNews",
+ "args": [],
+ "optional": false,
+ "returnType": "Observable",
+ "typeParameters": [],
+ "line": 14,
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { News } from '../domain/news';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NewsService {\n private newsUrl = '/api/news';\n\n constructor(private http: HttpClient) {}\n\n getAllNews(): Observable {\n const headers = new HttpHeaders({ 'Cache-Control': 'no-cache' });\n return this.http.get(this.newsUrl, { headers: headers }) as Observable;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 10,
+ "jsdoctags": [
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "NodeProgressService",
+ "id": "injectable-NodeProgressService-60bfb1fa4645e1308719b867d1585e948e6aca1da55adf272f168ff6ecc47dd9cba3489d927e9e47d57103d70049cc022fcb53907c78cdf30496523d37ac3aab",
+ "file": "src/assets/wise5/services/nodeProgressService.ts",
+ "properties": [],
+ "methods": [
+ {
+ "name": "calculateAndInjectCompletionPercentage",
+ "args": [
+ {
+ "name": "progress",
+ "type": "NodeProgress",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 83,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "progress",
+ "type": "NodeProgress",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "calculateAndInjectCompletionPercentageWithWork",
+ "args": [
+ {
+ "name": "progress",
+ "type": "NodeProgress",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 89,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "progress",
+ "type": "NodeProgress",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getNodeProgress",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeStatuses",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "NodeProgress",
+ "typeParameters": [],
+ "line": 17,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGet progress information for a given node\nwork), number of visible items (all/with work), completion % (for all items, items with student\nwork)\n",
+ "description": "Get progress information for a given node\nwork), number of visible items (all/with work), completion % (for all items, items with student\nwork)
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 325,
+ "end": 331,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 319,
+ "end": 324,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "the node id
\n"
+ },
+ {
+ "name": {
+ "pos": 356,
+ "end": 368,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeStatuses"
+ },
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 350,
+ "end": 355,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "all the NodeStatuses for the student
\n"
+ },
+ {
+ "tagName": {
+ "pos": 412,
+ "end": 419,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "object with number of completed items (both all and for items that capture student\nwork), number of visible items (all/with work), completion % (for all items, items with student\nwork)
\n"
+ }
+ ]
+ },
+ {
+ "name": "updateGroupNodeProgress",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "progress",
+ "type": "NodeProgress",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeStatuses",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "NodeProgress",
+ "typeParameters": [],
+ "line": 39,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "progress",
+ "type": "NodeProgress",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeStatuses",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateStepNodeProgress",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "progress",
+ "type": "NodeProgress",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeStatuses",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "NodeProgress",
+ "typeParameters": [],
+ "line": 61,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "progress",
+ "type": "NodeProgress",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeStatuses",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { NodeProgress } from '../common/NodeProgress';\nimport { ProjectService } from './projectService';\n\n@Injectable()\nexport class NodeProgressService {\n constructor(protected projectService: ProjectService) {}\n\n /**\n * Get progress information for a given node\n * @param nodeId the node id\n * @param nodeStatuses all the NodeStatuses for the student\n * @returns object with number of completed items (both all and for items that capture student\n * work), number of visible items (all/with work), completion % (for all items, items with student\n * work)\n */\n getNodeProgress(nodeId: string, nodeStatuses: any): NodeProgress {\n const progress: NodeProgress = {\n totalItems: 0,\n totalItemsWithWork: 0,\n completedItems: 0,\n completedItemsWithWork: 0\n };\n if (this.projectService.isGroupNode(nodeId)) {\n for (const childNodeId of this.projectService.getChildNodeIdsById(nodeId)) {\n if (this.projectService.isGroupNode(childNodeId)) {\n this.updateGroupNodeProgress(childNodeId, progress, nodeStatuses);\n } else {\n this.updateStepNodeProgress(childNodeId, progress, nodeStatuses);\n }\n }\n this.calculateAndInjectCompletionPercentage(progress);\n this.calculateAndInjectCompletionPercentageWithWork(progress);\n }\n // TODO: implement for steps (using components instead of child nodes)?\n return progress;\n }\n\n private updateGroupNodeProgress(\n nodeId: string,\n progress: NodeProgress,\n nodeStatuses: any\n ): NodeProgress {\n const nodeStatus = nodeStatuses[nodeId];\n if (nodeStatus.progress.totalItemsWithWork > -1) {\n progress.completedItems += nodeStatus.progress.completedItems;\n progress.totalItems += nodeStatus.progress.totalItems;\n progress.completedItemsWithWork += nodeStatus.progress.completedItemsWithWork;\n progress.totalItemsWithWork += nodeStatus.progress.totalItemsWithWork;\n } else {\n // we have a legacy node status so we'll need to calculate manually\n const groupProgress = this.getNodeProgress(nodeId, nodeStatuses);\n progress.completedItems += groupProgress.completedItems;\n progress.totalItems += groupProgress.totalItems;\n progress.completedItemsWithWork += groupProgress.completedItemsWithWork;\n progress.totalItemsWithWork += groupProgress.totalItemsWithWork;\n }\n return progress;\n }\n\n private updateStepNodeProgress(\n nodeId: string,\n progress: NodeProgress,\n nodeStatuses: any\n ): NodeProgress {\n const nodeStatus = nodeStatuses[nodeId];\n if (nodeStatus.isVisible) {\n progress.totalItems++;\n const hasWork = this.projectService.nodeHasWork(nodeId);\n if (hasWork) {\n progress.totalItemsWithWork++;\n }\n if (nodeStatus.isCompleted) {\n progress.completedItems++;\n if (hasWork) {\n progress.completedItemsWithWork++;\n }\n }\n }\n return progress;\n }\n\n private calculateAndInjectCompletionPercentage(progress: NodeProgress): void {\n const totalItems = progress.totalItems;\n const completedItems = progress.completedItems;\n progress.completionPct = totalItems ? Math.round((completedItems / totalItems) * 100) : 0;\n }\n\n private calculateAndInjectCompletionPercentageWithWork(progress: NodeProgress): void {\n const totalItemsWithWork = progress.totalItemsWithWork;\n const completedItemsWithWork = progress.completedItemsWithWork;\n progress.completionPctWithWork = totalItemsWithWork\n ? Math.round((completedItemsWithWork / totalItemsWithWork) * 100)\n : 0;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 6,
+ "jsdoctags": [
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "NodeService",
+ "id": "injectable-NodeService-c86c484f1dc0002067be37aafa316b60e4c99e9dbf222a7edc4bb5857988dccf887349f19bacc62429f2d3465ad89d57ffee82c848b7e585de8b986b16687af2",
+ "file": "src/assets/wise5/services/nodeService.ts",
+ "properties": [
+ {
+ "name": "doneRenderingComponent$",
+ "defaultValue": "this.doneRenderingComponentSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 11,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "doneRenderingComponentSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 10,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "nodeSubmitClicked$",
+ "defaultValue": "this.nodeSubmitClickedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "nodeSubmitClickedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 12,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "broadcastDoneRenderingComponent",
+ "args": [
+ {
+ "name": "nodeIdAndComponentId",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 55,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeIdAndComponentId",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastNodeSubmitClicked",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 51,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "closeNode",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 43,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getNextNodeId",
+ "args": [
+ {
+ "name": "currentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "optional": true
+ }
+ ],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 35,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 128
+ ],
+ "jsdoctags": [
+ {
+ "name": "currentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "optional": true,
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getPrevNodeId",
+ "args": [
+ {
+ "name": "currentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "optional": true
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 41,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 128
+ ],
+ "jsdoctags": [
+ {
+ "name": "currentId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "optional": true,
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "goToNextNode",
+ "args": [],
+ "optional": false,
+ "returnType": "Promise",
+ "typeParameters": [],
+ "line": 26,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "goToPrevNode",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 37,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "setCurrentNode",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 22,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { ConfigService } from './configService';\nimport { ProjectService } from './projectService';\nimport { DataService } from '../../../app/services/data.service';\nimport { Observable, Subject } from 'rxjs';\nimport { ConstraintService } from './constraintService';\n\n@Injectable()\nexport abstract class NodeService {\n private doneRenderingComponentSource: Subject = new Subject();\n public doneRenderingComponent$ = this.doneRenderingComponentSource.asObservable();\n private nodeSubmitClickedSource: Subject = new Subject();\n public nodeSubmitClicked$: Observable = this.nodeSubmitClickedSource.asObservable();\n\n constructor(\n protected configService: ConfigService,\n protected constraintService: ConstraintService,\n protected dataService: DataService,\n protected projectService: ProjectService\n ) {}\n\n setCurrentNode(nodeId: string): void {\n this.dataService.setCurrentNodeByNodeId(nodeId);\n }\n\n goToNextNode(): Promise {\n return this.getNextNodeId().then((nextNodeId: string) => {\n if (nextNodeId != null) {\n this.setCurrentNode(nextNodeId);\n }\n return nextNodeId;\n });\n }\n\n abstract getNextNodeId(currentId?: string): Promise;\n\n goToPrevNode(): void {\n this.setCurrentNode(this.getPrevNodeId());\n }\n\n abstract getPrevNodeId(currentId?: string): string;\n\n closeNode(): void {\n const currentNode = this.dataService.getCurrentNode();\n if (currentNode) {\n const parentNode = this.projectService.getParentGroup(currentNode.id);\n this.setCurrentNode(parentNode.id);\n }\n }\n\n broadcastNodeSubmitClicked(args: any) {\n this.nodeSubmitClickedSource.next(args);\n }\n\n broadcastDoneRenderingComponent(nodeIdAndComponentId: any) {\n this.doneRenderingComponentSource.next(nodeIdAndComponentId);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "constraintService",
+ "type": "ConstraintService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "dataService",
+ "type": "DataService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 13,
+ "jsdoctags": [
+ {
+ "name": "configService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "constraintService",
+ "type": "ConstraintService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "dataService",
+ "type": "DataService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "NodeStatusService",
+ "id": "injectable-NodeStatusService-2de99b3506939e032281e90b0dad4174c49f15d657e18c6701b359c90d33bea5685e245a4d659bcf80051f79ce98ec0d96b81cf1381cf9b303ea3cd4eddf7300",
+ "file": "src/assets/wise5/services/nodeStatusService.ts",
+ "properties": [
+ {
+ "name": "nodeIdToIsVisited",
+ "defaultValue": "{}",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "literal type",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 13,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "calculateComponentStatuses",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "literal type",
+ "typeParameters": [],
+ "line": 127,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "calculateNodeStatus",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "NodeStatus",
+ "typeParameters": [],
+ "line": 98,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "canVisitNode",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 48,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getNodeStatusByNodeId",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 53,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getNodeStatuses",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 58,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isAllVisibleComponentsCompleted",
+ "args": [
+ {
+ "name": "componentStatuses",
+ "type": "literal type",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 116,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "componentStatuses",
+ "type": "literal type",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "populateNodeIdToIsVisited",
+ "args": [
+ {
+ "name": "events",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 38,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "events",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setNodeIsVisited",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 44,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setNodeStatusByNodeId",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeStatus",
+ "type": "NodeStatus",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 168,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeStatus",
+ "type": "NodeStatus",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setNotVisibleIfRequired",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "constraintsForNode",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 138,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "constraintsForNode",
+ "type": "any[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeStatus",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateGroupNodeStatuses",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 76,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "updateNodeStatus",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeStatus",
+ "type": "NodeStatus",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 152,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeStatus",
+ "type": "NodeStatus",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateNodeStatusByNode",
+ "args": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 89,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "node",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateNodeStatusClientSaveTime",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "latestComponentStatesForNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 191,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "latestComponentStatesForNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateNodeStatuses",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 62,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "updateNodeStatusIcon",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 179,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateNodeStatusProgress",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 172,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateNodeStatusServerSaveTime",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "latestComponentStatesForNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 196,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "latestComponentStatesForNode",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateNodeStatusTimestamps",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 183,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateStepNodeStatuses",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 68,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { ComponentStatus } from '../common/ComponentStatus';\nimport { NodeStatus } from '../common/NodeStatus';\nimport { ConstraintService } from './constraintService';\nimport { NodeProgressService } from './nodeProgressService';\nimport { NotebookService } from './notebookService';\nimport { ProjectService } from './projectService';\nimport { StudentDataService } from './studentDataService';\nimport { CompletionService } from './completionService';\n\n@Injectable()\nexport class NodeStatusService {\n private nodeIdToIsVisited: { [nodeId: string]: boolean } = {};\n\n constructor(\n private completionService: CompletionService,\n private constraintService: ConstraintService,\n private dataService: StudentDataService,\n private nodeProgressService: NodeProgressService,\n private notebookService: NotebookService,\n private projectService: ProjectService\n ) {\n this.constraintService.constraintsUpdated$.subscribe(() => {\n this.updateNodeStatuses();\n });\n this.dataService.dataRetrieved$.subscribe((studentData) => {\n this.populateNodeIdToIsVisited(studentData.events);\n this.updateNodeStatuses();\n });\n this.dataService.updateNodeStatuses$.subscribe(() => {\n this.updateNodeStatuses();\n });\n this.notebookService.notebookUpdated$.subscribe(() => {\n this.updateNodeStatuses();\n });\n }\n\n private populateNodeIdToIsVisited(events: any[]): void {\n events\n .filter((event) => event.event === 'nodeEntered')\n .forEach((event) => this.setNodeIsVisited(event.nodeId));\n }\n\n setNodeIsVisited(nodeId: string): void {\n this.nodeIdToIsVisited[nodeId] = true;\n }\n\n canVisitNode(nodeId: string): boolean {\n const nodeStatus = this.getNodeStatusByNodeId(nodeId);\n return nodeStatus != null && nodeStatus.isVisitable;\n }\n\n getNodeStatusByNodeId(nodeId: string): any {\n // TODO: move nodeStatus from StudentDataService to this class\n return this.dataService.getNodeStatusByNodeId(nodeId);\n }\n\n getNodeStatuses(): any {\n return this.dataService.nodeStatuses;\n }\n\n private updateNodeStatuses(): void {\n this.updateStepNodeStatuses();\n this.updateGroupNodeStatuses();\n this.dataService.broadcastNodeStatusesChanged();\n }\n\n private updateStepNodeStatuses(): void {\n for (const nodeId of this.projectService.getFlattenedProjectAsNodeIds()) {\n if (!this.projectService.isGroupNode(nodeId)) {\n this.updateNodeStatusByNode(this.projectService.getNodeById(nodeId));\n }\n }\n }\n\n private updateGroupNodeStatuses(): void {\n const groups = this.projectService.getGroups();\n for (const group of groups) {\n group.depth = this.projectService.getNodeDepth(group.id, 0);\n }\n groups.sort(function (a, b) {\n return b.depth - a.depth;\n });\n for (const group of groups) {\n this.updateNodeStatusByNode(group);\n }\n }\n\n private updateNodeStatusByNode(node: any): void {\n const nodeId = node.id;\n const nodeStatus = this.calculateNodeStatus(node);\n this.updateNodeStatus(nodeId, nodeStatus);\n this.updateNodeStatusProgress(nodeId);\n this.updateNodeStatusIcon(nodeId);\n this.updateNodeStatusTimestamps(nodeId);\n }\n\n private calculateNodeStatus(node: any): NodeStatus {\n const nodeId = node.id;\n const nodeStatus = new NodeStatus(nodeId);\n const constraintsForNode = this.constraintService.getConstraintsThatAffectNode(node);\n const constraintResults = this.constraintService.evaluate(constraintsForNode);\n nodeStatus.isVisible = constraintResults.isVisible;\n nodeStatus.isVisitable = constraintResults.isVisitable;\n this.setNotVisibleIfRequired(nodeId, constraintsForNode, nodeStatus);\n if (this.projectService.isApplicationNode(node.id)) {\n nodeStatus.componentStatuses = this.calculateComponentStatuses(node);\n nodeStatus.isCompleted = this.isAllVisibleComponentsCompleted(nodeStatus.componentStatuses);\n } else {\n nodeStatus.isCompleted = this.completionService.isCompleted(nodeId);\n }\n nodeStatus.isVisited = this.nodeIdToIsVisited[nodeId] == true;\n return nodeStatus;\n }\n\n private isAllVisibleComponentsCompleted(componentStatuses: {\n [componentId: string]: ComponentStatus;\n }): boolean {\n for (const componentId in componentStatuses) {\n if (componentStatuses[componentId].isVisibleAndNotCompleted()) {\n return false;\n }\n }\n return true;\n }\n\n private calculateComponentStatuses(node: any): { [componentId: string]: ComponentStatus } {\n const componentStatuses = {};\n node.components.forEach((component) => {\n componentStatuses[component.id] = new ComponentStatus(\n this.completionService.isCompleted(node.id, component.id),\n this.constraintService.evaluate(component.constraints).isVisible\n );\n });\n return componentStatuses;\n }\n\n private setNotVisibleIfRequired(\n nodeId: string,\n constraintsForNode: any[],\n nodeStatus: any\n ): void {\n if (\n constraintsForNode.length == 0 &&\n this.projectService.getFlattenedProjectAsNodeIds().indexOf(nodeId) == -1 &&\n !this.projectService.isGroupNode(nodeId)\n ) {\n nodeStatus.isVisible = false;\n }\n }\n\n private updateNodeStatus(nodeId: string, nodeStatus: NodeStatus): void {\n // TODO: figure out why we need this if-else check. Why not just over-write the NodeStatus?\n const oldNodeStatus = this.getNodeStatusByNodeId(nodeId);\n if (oldNodeStatus == null) {\n this.setNodeStatusByNodeId(nodeId, nodeStatus);\n } else {\n this.dataService.nodeStatuses[nodeId].isVisited = nodeStatus.isVisited;\n this.dataService.nodeStatuses[nodeId].isVisible = nodeStatus.isVisible;\n this.dataService.nodeStatuses[nodeId].isVisitable = nodeStatus.isVisitable;\n this.dataService.nodeStatuses[nodeId].isCompleted = nodeStatus.isCompleted;\n if (this.projectService.isApplicationNode(nodeId)) {\n this.dataService.nodeStatuses[nodeId].componentStatuses = nodeStatus.componentStatuses;\n }\n }\n }\n\n private setNodeStatusByNodeId(nodeId: string, nodeStatus: NodeStatus): void {\n this.dataService.nodeStatuses[nodeId] = nodeStatus;\n }\n\n private updateNodeStatusProgress(nodeId: string): void {\n this.dataService.nodeStatuses[nodeId].progress = this.nodeProgressService.getNodeProgress(\n nodeId,\n this.getNodeStatuses()\n );\n }\n\n private updateNodeStatusIcon(nodeId: string): void {\n this.dataService.nodeStatuses[nodeId].icon = this.projectService.getNode(nodeId).getIcon();\n }\n\n private updateNodeStatusTimestamps(nodeId: string): void {\n const latestComponentStatesForNode = this.dataService.getLatestComponentStateByNodeId(nodeId);\n if (latestComponentStatesForNode != null) {\n this.updateNodeStatusClientSaveTime(nodeId, latestComponentStatesForNode);\n this.updateNodeStatusServerSaveTime(nodeId, latestComponentStatesForNode);\n }\n }\n\n private updateNodeStatusClientSaveTime(nodeId: string, latestComponentStatesForNode: any): void {\n this.dataService.nodeStatuses[nodeId].latestComponentStateClientSaveTime =\n latestComponentStatesForNode.clientSaveTime;\n }\n\n private updateNodeStatusServerSaveTime(nodeId: string, latestComponentStatesForNode: any): void {\n this.dataService.nodeStatuses[nodeId].latestComponentStateServerSaveTime =\n latestComponentStatesForNode.serverSaveTime;\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "completionService",
+ "type": "CompletionService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "constraintService",
+ "type": "ConstraintService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "dataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeProgressService",
+ "type": "NodeProgressService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "notebookService",
+ "type": "NotebookService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 13,
+ "jsdoctags": [
+ {
+ "name": "completionService",
+ "type": "CompletionService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "constraintService",
+ "type": "ConstraintService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "dataService",
+ "type": "StudentDataService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeProgressService",
+ "type": "NodeProgressService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "notebookService",
+ "type": "NotebookService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "projectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "NotebookService",
+ "id": "injectable-NotebookService-ed1d642d7ad35512fd10967ba59be8a230df73592eea8ce258fe50437b4bf1c625be34f5ebbf5bbefb9c4ebabc0240f191aef6112927af862a9b74e2824114d4",
+ "file": "src/assets/wise5/services/notebookService.ts",
+ "properties": [
+ {
+ "name": "config",
+ "defaultValue": "{\n enabled: false,\n label: $localize`Notebook`,\n icon: 'book',\n enableAddNew: true,\n addIcon: 'note_add',\n itemTypes: {\n note: {\n enabled: true,\n requireTextOnEveryNote: false,\n enableLink: true,\n enableClipping: true,\n enableStudentUploads: true,\n type: 'note',\n label: {\n singular: $localize`note`,\n plural: $localize`notes`,\n link: $localize`Manage Notes`,\n icon: 'note',\n color: '#1565C0'\n }\n },\n report: {\n enabled: false,\n enableLink: true,\n type: 'report',\n label: {\n singular: $localize`report`,\n plural: $localize`reports`,\n link: $localize`Report`,\n icon: 'assignment',\n color: '#AD1457'\n },\n notes: []\n }\n }\n }",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "object",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16
+ },
+ {
+ "name": "http",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "HttpClient",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 75,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "insertMode$",
+ "defaultValue": "this.insertModeSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 69,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "insertModeSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 68,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "notebookItemAnnotationReceived$",
+ "defaultValue": "this.notebookItemAnnotationReceivedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 57,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "notebookItemAnnotationReceivedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 56,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "notebookItemChosen$",
+ "defaultValue": "this.notebookItemChosenSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 59,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "notebookItemChosenSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 58,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "notebooksByWorkgroup",
+ "defaultValue": "{}",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "object",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 55
+ },
+ {
+ "name": "notebookUpdated$",
+ "defaultValue": "this.notebookUpdatedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 61,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "notebookUpdatedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 60,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "notesVisible$",
+ "defaultValue": "this.notesVisibleSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 67,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "notesVisibleSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 66,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "publicNotebookItems",
+ "defaultValue": "{}",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "object",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 54
+ },
+ {
+ "name": "publicNotebookItemsRetrieved$",
+ "defaultValue": "this.publicNotebookItemsRetrievedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 63,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "publicNotebookItemsRetrievedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 62,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "reportFullScreen$",
+ "defaultValue": "this.reportFullScreenSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 71,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "reportFullScreenSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 70,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "reports",
+ "defaultValue": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 53
+ },
+ {
+ "name": "showReportAnnotations$",
+ "defaultValue": "this.showReportAnnotationsSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "unknown",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 65,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "showReportAnnotationsSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 64,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "addNote",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "file",
+ "type": "File",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "text",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "studentWorkIds",
+ "type": "number[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "isEditTextEnabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "true"
+ },
+ {
+ "name": "isFileUploadEnabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "true"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 93,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "file",
+ "type": "File",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "text",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentWorkIds",
+ "type": "number[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isEditTextEnabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "true",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isFileUploadEnabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "true",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "addToNotebooksByWorgkroup",
+ "args": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 346,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastNotebookItemAnnotationReceived",
+ "args": [
+ {
+ "name": "annotation",
+ "type": "Annotation",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 81,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "annotation",
+ "type": "Annotation",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastNotebookItemChosen",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 627,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastNotebookUpdated",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 631,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastPublicNotebookItemsRetrieved",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 635,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastShowReportAnnotations",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 639,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "closeNotes",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 643,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "copyNotebookItem",
+ "args": [
+ {
+ "name": "notebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 597,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "deleteNote",
+ "args": [
+ {
+ "name": "note",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 185,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "note",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "doRetrieveNotebookItems",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 313,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "doRetrievePublicNotebookItems",
+ "args": [
+ {
+ "name": "group",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 431,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "group",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "doSaveNotebookItem",
+ "args": [
+ {
+ "name": "notebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "type",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "title",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "content",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "groups",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "clientDeleteTime",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 532,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "type",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "title",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "content",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "groups",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "clientDeleteTime",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "editNote",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "note",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isEditMode",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "true"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 115,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "note",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isEditMode",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "true",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getLatestNotebookItemByLocalNotebookItemId",
+ "args": [
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.ConfigService.getWorkgroupId()"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 213,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.ConfigService.getWorkgroupId()",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getLatestNotebookReportItemByReportId",
+ "args": [
+ {
+ "name": "reportId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.ConfigService.getWorkgroupId()"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 229,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "reportId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.ConfigService.getWorkgroupId()",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getMaxScoreByReportId",
+ "args": [
+ {
+ "name": "reportId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 251,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "reportId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getNotebookByWorkgroup",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.ConfigService.getWorkgroupId()"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 408,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.ConfigService.getWorkgroupId()",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getNotebookConfig",
+ "args": [],
+ "optional": false,
+ "returnType": "{ enabled: boolean; label: any; icon: string; enableAddNew: boolean; addIcon: string; itemTypes: { note: { enabled: boolean; requireTextOnEveryNote: boolean; enableLink: boolean; enableClipping: boolean; enableStudentUploads: boolean; type: string; label: { ...; }; }; report: { ...; }; }; }",
+ "typeParameters": [],
+ "line": 259,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getPrivateNotebookItems",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.ConfigService.getWorkgroupId()"
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 397,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "this.ConfigService.getWorkgroupId()",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getReportNoteContentByReportId",
+ "args": [
+ {
+ "name": "reportId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 267,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nReturns the report content for the specified reportId, or null if not exists.\n",
+ "description": "Returns the report content for the specified reportId, or null if not exists.
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 7791,
+ "end": 7799,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "reportId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 7785,
+ "end": 7790,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": ""
+ }
+ ]
+ },
+ {
+ "name": "getStudentNotebookConfig",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 85,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getTeacherNotebookConfig",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 89,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getTemplateReportItemByReportId",
+ "args": [
+ {
+ "name": "reportId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{ id: any; type: string; localNotebookItemId: any; content: any; }",
+ "typeParameters": [],
+ "line": 236,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "reportId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "groupNotebookItems",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 357,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nGroups the notebook items together in to a map-like structure by workgroup inside this.notebook.items.\n",
+ "description": "Groups the notebook items together in to a map-like structure by workgroup inside this.notebook.items.
\n"
+ },
+ {
+ "name": "handleNewNotebookItem",
+ "args": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 615,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "handleRetrieveNotebookItems",
+ "args": [
+ {
+ "name": "notebookItems",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 327,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notebookItems",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "handleRetrievePublicNotebookItems",
+ "args": [
+ {
+ "name": "publicNotebookItemsForGroup",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "group",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 449,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "publicNotebookItemsForGroup",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "group",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "handleSaveNotebookItem",
+ "args": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 568,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isNotebookEnabled",
+ "args": [
+ {
+ "name": "type",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "'notebook'"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 277,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "type",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "'notebook'",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isNotebookItemPrivate",
+ "args": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 593,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isNotebookItemPublic",
+ "args": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 589,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "isStudentNoteClippingEnabled",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 288,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isStudentNoteEnabled",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 281,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "retrieveNotebookItems",
+ "args": [
+ {
+ "name": "workgroupId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 295,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "workgroupId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "retrievePublicNotebookItems",
+ "args": [
+ {
+ "name": "group",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "periodId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 420,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "group",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "reviveNote",
+ "args": [
+ {
+ "name": "note",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 192,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "note",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "saveNotebookItem",
+ "args": [
+ {
+ "name": "notebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "type",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "title",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "content",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "groups",
+ "type": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]"
+ },
+ {
+ "name": "clientSaveTime",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "clientDeleteTime",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 458,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "type",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "title",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "content",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "groups",
+ "type": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "[]",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "clientSaveTime",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "clientDeleteTime",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "savePreviewNotebookItem",
+ "args": [
+ {
+ "name": "notebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "type",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "title",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "content",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "groups",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "clientSaveTime",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "clientDeleteTime",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 495,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "localNotebookItemId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "type",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "title",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "content",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "groups",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "clientSaveTime",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "clientDeleteTime",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setInsertMode",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 652,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setNotesVisible",
+ "args": [
+ {
+ "name": "value",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 648,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "value",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setReportFullScreen",
+ "args": [
+ {
+ "name": "value",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 656,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "value",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "showEditNoteDialog",
+ "args": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "note",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isEditMode",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "file",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "text",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isEditTextEnabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isFileUploadEnabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "studentWorkIds",
+ "type": "number[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 133,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "nodeId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "note",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isEditMode",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "file",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "text",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isEditTextEnabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "isFileUploadEnabled",
+ "type": "boolean",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "studentWorkIds",
+ "type": "number[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updateNote",
+ "args": [
+ {
+ "name": "note",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "clientSaveTime",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "Date.parse(new Date().toString())"
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 198,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "note",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "clientSaveTime",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "Date.parse(new Date().toString())",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "updatePrivateNotebookItem",
+ "args": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 584,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notebookItem",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "'use strict';\n\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { ConfigService } from './configService';\nimport { ProjectService } from './projectService';\nimport { StudentAssetService } from './studentAssetService';\nimport { Subject } from 'rxjs';\nimport { MatDialog } from '@angular/material/dialog';\nimport { EditNotebookItemDialogComponent } from '../themes/default/notebook/edit-notebook-item-dialog/edit-notebook-item-dialog.component';\nimport { Annotation } from '../common/Annotation';\n\n@Injectable()\nexport class NotebookService {\n // TODO: allow wise instance to set defaults in wise config?\n config = {\n enabled: false,\n label: $localize`Notebook`,\n icon: 'book',\n enableAddNew: true,\n addIcon: 'note_add',\n itemTypes: {\n note: {\n enabled: true,\n requireTextOnEveryNote: false,\n enableLink: true,\n enableClipping: true,\n enableStudentUploads: true,\n type: 'note',\n label: {\n singular: $localize`note`,\n plural: $localize`notes`,\n link: $localize`Manage Notes`,\n icon: 'note',\n color: '#1565C0'\n }\n },\n report: {\n enabled: false,\n enableLink: true,\n type: 'report',\n label: {\n singular: $localize`report`,\n plural: $localize`reports`,\n link: $localize`Report`,\n icon: 'assignment',\n color: '#AD1457'\n },\n notes: []\n }\n }\n };\n reports = [];\n publicNotebookItems = {};\n notebooksByWorkgroup = {};\n private notebookItemAnnotationReceivedSource: Subject = new Subject();\n public notebookItemAnnotationReceived$ = this.notebookItemAnnotationReceivedSource.asObservable();\n private notebookItemChosenSource: Subject = new Subject();\n public notebookItemChosen$ = this.notebookItemChosenSource.asObservable();\n private notebookUpdatedSource: Subject = new Subject();\n public notebookUpdated$ = this.notebookUpdatedSource.asObservable();\n private publicNotebookItemsRetrievedSource: Subject = new Subject();\n public publicNotebookItemsRetrieved$ = this.publicNotebookItemsRetrievedSource.asObservable();\n private showReportAnnotationsSource: Subject = new Subject();\n public showReportAnnotations$ = this.showReportAnnotationsSource.asObservable();\n private notesVisibleSource: Subject = new Subject();\n public notesVisible$ = this.notesVisibleSource.asObservable();\n private insertModeSource: Subject = new Subject();\n public insertMode$ = this.insertModeSource.asObservable();\n private reportFullScreenSource: Subject = new Subject();\n public reportFullScreen$ = this.reportFullScreenSource.asObservable();\n\n constructor(\n private dialog: MatDialog,\n public http: HttpClient,\n private ConfigService: ConfigService,\n private ProjectService: ProjectService,\n private StudentAssetService: StudentAssetService\n ) {}\n\n broadcastNotebookItemAnnotationReceived(annotation: Annotation) {\n this.notebookItemAnnotationReceivedSource.next(annotation);\n }\n\n getStudentNotebookConfig() {\n return Object.assign(this.config, this.ProjectService.project.notebook);\n }\n\n getTeacherNotebookConfig() {\n return Object.assign(this.config, this.ProjectService.project.teacherNotebook);\n }\n\n addNote(\n nodeId: string,\n file: File = null,\n text: string = null,\n studentWorkIds: number[] = null,\n isEditTextEnabled: boolean = true,\n isFileUploadEnabled: boolean = true\n ) {\n const note = null;\n const isEditMode = true;\n this.showEditNoteDialog(\n nodeId,\n note,\n isEditMode,\n file,\n text,\n isEditTextEnabled,\n isFileUploadEnabled,\n studentWorkIds\n );\n }\n\n editNote(nodeId: string, note: any, isEditMode: boolean = true) {\n const file = null;\n const noteText = null;\n const isEditTextEnabled = true;\n const isFileUploadEnabled = true;\n const studentWorkIds = null;\n this.showEditNoteDialog(\n nodeId,\n note,\n isEditMode,\n file,\n noteText,\n isEditTextEnabled,\n isFileUploadEnabled,\n studentWorkIds\n );\n }\n\n private showEditNoteDialog(\n nodeId: string,\n note: any,\n isEditMode: boolean,\n file: any,\n text: string,\n isEditTextEnabled: boolean,\n isFileUploadEnabled: boolean,\n studentWorkIds: number[]\n ): void {\n this.dialog.open(EditNotebookItemDialogComponent, {\n width: '600px',\n data: {\n copyNotebookItem: (notebookItemId: string) => {\n return this.copyNotebookItem(notebookItemId);\n },\n file: file,\n isEditMode: isEditMode,\n isEditTextEnabled: isEditTextEnabled,\n isFileUploadEnabled: isFileUploadEnabled,\n nodeId: nodeId,\n note: note,\n notebookConfig: this.config,\n saveNotebookItem: (\n notebookItemId,\n nodeId,\n localNotebookItemId,\n type,\n title,\n content,\n groups,\n clientSaveTime,\n clientDeleteTime\n ) => {\n return this.saveNotebookItem(\n notebookItemId,\n nodeId,\n localNotebookItemId,\n type,\n title,\n content,\n groups,\n clientSaveTime,\n clientDeleteTime\n );\n },\n studentWorkIds: studentWorkIds,\n text: text\n }\n });\n }\n\n deleteNote(note) {\n const noteCopy = { ...note };\n const clientTime = Date.parse(new Date().toString());\n noteCopy.clientDeleteTime = clientTime;\n return this.updateNote(noteCopy, clientTime);\n }\n\n reviveNote(note) {\n const noteCopy = { ...note };\n noteCopy.clientDeleteTime = null;\n return this.updateNote(noteCopy);\n }\n\n updateNote(note, clientSaveTime = Date.parse(new Date().toString())) {\n note.id = null; // set to null so we're creating a new notebook item\n return this.saveNotebookItem(\n note.id,\n note.nodeId,\n note.localNotebookItemId,\n note.type,\n note.title,\n note.content,\n note.groups,\n clientSaveTime,\n note.clientDeleteTime\n );\n }\n\n getLatestNotebookItemByLocalNotebookItemId(\n localNotebookItemId,\n workgroupId = this.ConfigService.getWorkgroupId()\n ) {\n const notebookByWorkgroup = this.getNotebookByWorkgroup(workgroupId);\n if (notebookByWorkgroup != null) {\n const allNotebookItems = [...notebookByWorkgroup.allItems].reverse();\n for (let notebookItem of allNotebookItems) {\n if (notebookItem.localNotebookItemId === localNotebookItemId) {\n return notebookItem;\n }\n }\n }\n return null;\n }\n\n getLatestNotebookReportItemByReportId(\n reportId,\n workgroupId = this.ConfigService.getWorkgroupId()\n ) {\n return this.getLatestNotebookItemByLocalNotebookItemId(reportId, workgroupId);\n }\n\n getTemplateReportItemByReportId(reportId) {\n const reportNotes = this.config.itemTypes.report.notes;\n for (let reportNote of reportNotes) {\n if (reportNote.reportId === reportId) {\n return {\n id: null,\n type: 'report',\n localNotebookItemId: reportId,\n content: reportNote\n };\n }\n }\n return null;\n }\n\n getMaxScoreByReportId(reportId) {\n const reportNoteContent = this.getReportNoteContentByReportId(reportId);\n if (reportNoteContent != null && reportNoteContent.maxScore != null) {\n return reportNoteContent.maxScore;\n }\n return 0;\n }\n\n getNotebookConfig() {\n return this.config;\n }\n\n /**\n * Returns the report content for the specified reportId, or null if not exists.\n * @param reportId\n */\n getReportNoteContentByReportId(reportId) {\n const reportNotes = this.config.itemTypes.report.notes;\n for (let reportNote of reportNotes) {\n if (reportNote.reportId === reportId) {\n return reportNote;\n }\n }\n return null;\n }\n\n isNotebookEnabled(type: string = 'notebook') {\n return this.ProjectService.project[type] != null && this.ProjectService.project[type].enabled;\n }\n\n isStudentNoteEnabled() {\n return (\n this.ProjectService.project.notebook != null &&\n this.ProjectService.project.notebook.itemTypes.note.enabled\n );\n }\n\n isStudentNoteClippingEnabled() {\n return (\n this.isStudentNoteEnabled() &&\n this.ProjectService.project.notebook.itemTypes.note.enableClipping\n );\n }\n\n retrieveNotebookItems(workgroupId = null) {\n if (this.ConfigService.isPreview()) {\n // we are previewing the project, initialize dummy student data\n const workgroupId = this.ConfigService.getWorkgroupId();\n this.notebooksByWorkgroup[workgroupId] = {};\n this.notebooksByWorkgroup[workgroupId].allItems = [];\n this.notebooksByWorkgroup[workgroupId].items = [];\n this.notebooksByWorkgroup[workgroupId].deletedItems = [];\n this.groupNotebookItems();\n // pretend sending data to server\n return new Promise((resolve, reject) => {\n resolve(this.notebooksByWorkgroup[workgroupId]);\n });\n } else {\n return this.doRetrieveNotebookItems(workgroupId);\n }\n }\n\n doRetrieveNotebookItems(workgroupId) {\n let url = this.ConfigService.getNotebookURL();\n if (workgroupId != null) {\n url += `/workgroup/${workgroupId}`;\n }\n return this.http\n .get(url)\n .toPromise()\n .then((resultData) => {\n const notebookItems = resultData;\n return this.handleRetrieveNotebookItems(notebookItems);\n });\n }\n\n handleRetrieveNotebookItems(notebookItems) {\n this.notebooksByWorkgroup = {};\n for (let notebookItem of notebookItems) {\n try {\n if (notebookItem.studentAssetId != null) {\n notebookItem.studentAsset = this.StudentAssetService.getAssetById(\n notebookItem.studentAssetId\n );\n } else {\n notebookItem.content = JSON.parse(notebookItem.content);\n }\n const workgroupId = notebookItem.workgroupId;\n this.addToNotebooksByWorgkroup(notebookItem, workgroupId);\n } catch (e) {}\n }\n this.groupNotebookItems();\n return this.notebooksByWorkgroup;\n }\n\n addToNotebooksByWorgkroup(notebookItem, workgroupId) {\n if (this.notebooksByWorkgroup.hasOwnProperty(workgroupId)) {\n this.notebooksByWorkgroup[workgroupId].allItems.push(notebookItem);\n } else {\n this.notebooksByWorkgroup[workgroupId] = { allItems: [notebookItem] };\n }\n }\n\n /**\n * Groups the notebook items together in to a map-like structure by workgroup inside this.notebook.items.\n */\n groupNotebookItems() {\n for (let workgroupId in this.notebooksByWorkgroup) {\n if (this.notebooksByWorkgroup.hasOwnProperty(workgroupId)) {\n const notebookByWorkgroup = this.notebooksByWorkgroup[workgroupId];\n notebookByWorkgroup.items = {};\n notebookByWorkgroup.deletedItems = {}; // reset deleted items\n for (let ni = 0; ni < notebookByWorkgroup.allItems.length; ni++) {\n const notebookItem = notebookByWorkgroup.allItems[ni];\n const notebookItemLocalNotebookItemId = notebookItem.localNotebookItemId;\n if (notebookByWorkgroup.items.hasOwnProperty(notebookItemLocalNotebookItemId)) {\n notebookByWorkgroup.items[notebookItemLocalNotebookItemId].push(notebookItem);\n } else {\n notebookByWorkgroup.items[notebookItemLocalNotebookItemId] = [notebookItem];\n }\n }\n // Go through the items and look at the last revision of each item.\n // If it's deleted, then move the entire item array to deletedItems\n for (let notebookItemLocalNotebookItemIdKey in notebookByWorkgroup.items) {\n if (notebookByWorkgroup.items.hasOwnProperty(notebookItemLocalNotebookItemIdKey)) {\n const allRevisionsForThisLocalNotebookItemId =\n notebookByWorkgroup.items[notebookItemLocalNotebookItemIdKey];\n if (allRevisionsForThisLocalNotebookItemId != null) {\n const lastRevision =\n allRevisionsForThisLocalNotebookItemId[\n allRevisionsForThisLocalNotebookItemId.length - 1\n ];\n if (lastRevision != null && lastRevision.serverDeleteTime != null) {\n // the last revision for this was deleted,\n // so move the entire note (with all its revisions) to deletedItems\n notebookByWorkgroup.deletedItems[notebookItemLocalNotebookItemIdKey] =\n allRevisionsForThisLocalNotebookItemId;\n delete notebookByWorkgroup.items[notebookItemLocalNotebookItemIdKey];\n }\n }\n }\n }\n }\n }\n }\n\n getPrivateNotebookItems(workgroupId = this.ConfigService.getWorkgroupId()) {\n const notebookByWorkgroup = this.getNotebookByWorkgroup(workgroupId);\n const privateNotebookItems = [];\n for (let notebookItem of notebookByWorkgroup.allItems) {\n if (notebookItem.groups == null || notebookItem.groups.length == 0) {\n privateNotebookItems.push(notebookItem);\n }\n }\n return privateNotebookItems;\n }\n\n getNotebookByWorkgroup(workgroupId = this.ConfigService.getWorkgroupId()) {\n let notebookByWorkgroup = this.notebooksByWorkgroup[workgroupId];\n if (notebookByWorkgroup == null) {\n notebookByWorkgroup = {\n allItems: [],\n items: {},\n deletedItems: {}\n };\n }\n return notebookByWorkgroup;\n }\n\n retrievePublicNotebookItems(group = null, periodId = null) {\n if (this.ConfigService.isPreview()) {\n // pretend we made a request to server\n return new Promise((resolve, reject) => {\n resolve({});\n });\n } else {\n return this.doRetrievePublicNotebookItems(group, periodId);\n }\n }\n\n doRetrievePublicNotebookItems(group, periodId) {\n const url = `${this.ConfigService.getNotebookURL()}/group/${group}`;\n const params = {};\n if (periodId != null) {\n params['periodId'] = periodId;\n }\n const options = {\n params: params\n };\n return this.http\n .get(url, options)\n .toPromise()\n .then((resultData) => {\n const publicNotebookItemsForGroup = resultData;\n return this.handleRetrievePublicNotebookItems(publicNotebookItemsForGroup, group);\n });\n }\n\n handleRetrievePublicNotebookItems(publicNotebookItemsForGroup, group) {\n for (let publicNotebookItemForGroup of publicNotebookItemsForGroup) {\n publicNotebookItemForGroup.content = JSON.parse(publicNotebookItemForGroup.content);\n }\n this.publicNotebookItems[group] = publicNotebookItemsForGroup;\n this.broadcastPublicNotebookItemsRetrieved({ publicNotebookItems: this.publicNotebookItems });\n return this.publicNotebookItems;\n }\n\n saveNotebookItem(\n notebookItemId,\n nodeId,\n localNotebookItemId,\n type,\n title,\n content,\n groups = [],\n clientSaveTime = null,\n clientDeleteTime = null\n ) {\n if (this.ConfigService.isPreview()) {\n return this.savePreviewNotebookItem(\n notebookItemId,\n nodeId,\n localNotebookItemId,\n type,\n title,\n content,\n groups,\n clientSaveTime,\n clientDeleteTime\n );\n } else {\n return this.doSaveNotebookItem(\n notebookItemId,\n nodeId,\n localNotebookItemId,\n type,\n title,\n content,\n groups,\n clientDeleteTime\n );\n }\n }\n\n savePreviewNotebookItem(\n notebookItemId,\n nodeId,\n localNotebookItemId,\n type,\n title,\n content,\n groups,\n clientSaveTime,\n clientDeleteTime\n ) {\n return new Promise((resolve, reject) => {\n const notebookItem = {\n content: content,\n localNotebookItemId: localNotebookItemId,\n nodeId: nodeId,\n notebookItemId: notebookItemId,\n title: title,\n type: type,\n workgroupId: this.ConfigService.getWorkgroupId(),\n groups: groups,\n clientSaveTime: clientSaveTime,\n serverSaveTime: clientSaveTime,\n clientDeleteTime: clientDeleteTime,\n serverDeleteTime: clientDeleteTime ? clientDeleteTime : null\n };\n const workgroupId = notebookItem.workgroupId;\n this.addToNotebooksByWorgkroup(notebookItem, workgroupId);\n this.groupNotebookItems();\n this.broadcastNotebookUpdated({\n notebook: this.notebooksByWorkgroup[workgroupId],\n notebookItem: notebookItem\n });\n resolve(notebookItem);\n });\n }\n\n doSaveNotebookItem(\n notebookItemId,\n nodeId,\n localNotebookItemId,\n type,\n title,\n content,\n groups,\n clientDeleteTime\n ) {\n const params = {\n workgroupId: this.ConfigService.getWorkgroupId(),\n notebookItemId: notebookItemId,\n localNotebookItemId: localNotebookItemId,\n nodeId: nodeId,\n type: type,\n title: title,\n content: JSON.stringify(content),\n groups: JSON.stringify(groups),\n clientSaveTime: Date.parse(new Date().toString()),\n clientDeleteTime: clientDeleteTime\n };\n if (this.ConfigService.getMode() !== 'classroomMonitor') {\n params['periodId'] = this.ConfigService.getPeriodId();\n }\n const headers = new HttpHeaders({ 'Content-Type': 'application/x-www-form-urlencoded' });\n return this.http\n .post(this.ConfigService.getNotebookURL(), $.param(params), { headers: headers })\n .toPromise()\n .then((resultData) => {\n const notebookItem = resultData;\n this.handleSaveNotebookItem(notebookItem);\n return resultData;\n });\n }\n\n handleSaveNotebookItem(notebookItem) {\n if (notebookItem != null) {\n if (notebookItem.type === 'note' || notebookItem.type === 'report') {\n notebookItem.content = JSON.parse(notebookItem.content);\n }\n const workgroupId = notebookItem.workgroupId;\n if (this.isNotebookItemPrivate(notebookItem)) {\n this.updatePrivateNotebookItem(notebookItem, workgroupId);\n }\n this.broadcastNotebookUpdated({\n notebook: this.notebooksByWorkgroup[workgroupId],\n notebookItem: notebookItem\n });\n }\n }\n\n updatePrivateNotebookItem(notebookItem, workgroupId) {\n this.addToNotebooksByWorgkroup(notebookItem, workgroupId);\n this.groupNotebookItems();\n }\n\n isNotebookItemPublic(notebookItem) {\n return !this.isNotebookItemPrivate(notebookItem);\n }\n\n isNotebookItemPrivate(notebookItem) {\n return notebookItem.groups == null;\n }\n\n copyNotebookItem(notebookItemId) {\n if (!this.ConfigService.isPreview()) {\n const url = `${this.ConfigService.getNotebookURL()}/parent/${notebookItemId}`;\n const params = {\n workgroupId: this.ConfigService.getWorkgroupId(),\n clientSaveTime: Date.parse(new Date().toString())\n };\n const headers = new HttpHeaders({ 'Content-Type': 'application/x-www-form-urlencoded' });\n return this.http\n .post(url, $.param(params), { headers: headers })\n .toPromise()\n .then((resultData) => {\n const notebookItem = resultData;\n return this.handleNewNotebookItem(notebookItem);\n });\n }\n }\n\n handleNewNotebookItem(notebookItem) {\n notebookItem.content = JSON.parse(notebookItem.content);\n const workgroupId = notebookItem.workgroupId;\n this.notebooksByWorkgroup[workgroupId].allItems.push(notebookItem);\n this.groupNotebookItems();\n this.broadcastNotebookUpdated({\n notebook: this.notebooksByWorkgroup[workgroupId],\n notebookItem: notebookItem\n });\n return notebookItem;\n }\n\n broadcastNotebookItemChosen(args: any) {\n this.notebookItemChosenSource.next(args);\n }\n\n broadcastNotebookUpdated(args: any) {\n this.notebookUpdatedSource.next(args);\n }\n\n broadcastPublicNotebookItemsRetrieved(args: any) {\n this.publicNotebookItemsRetrievedSource.next(args);\n }\n\n broadcastShowReportAnnotations() {\n this.showReportAnnotationsSource.next();\n }\n\n closeNotes(): void {\n this.setNotesVisible(false);\n this.setInsertMode({ insertMode: false });\n }\n\n setNotesVisible(value: boolean): void {\n this.notesVisibleSource.next(value);\n }\n\n setInsertMode(args: any): void {\n this.insertModeSource.next(args);\n }\n\n setReportFullScreen(value: boolean): void {\n this.reportFullScreenSource.next(value);\n }\n}\n",
+ "constructorObj": {
+ "name": "constructor",
+ "description": "",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "args": [
+ {
+ "name": "dialog",
+ "type": "MatDialog",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "ProjectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "StudentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "line": 71,
+ "jsdoctags": [
+ {
+ "name": "dialog",
+ "type": "MatDialog",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "http",
+ "type": "HttpClient",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "ConfigService",
+ "type": "ConfigService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "ProjectService",
+ "type": "ProjectService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "StudentAssetService",
+ "type": "StudentAssetService",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ "extends": [],
+ "type": "injectable"
+ },
+ {
+ "name": "NotificationService",
+ "id": "injectable-NotificationService-b9c84b895bde1df4d196f1749b66b0667ab05f5e5c7c362f8fa6be470a69d63418d71c5cf86fe1d36ef59683f04be3ca6183d84f56d4f878a05e7e11dd7cdd33",
+ "file": "src/assets/wise5/services/notificationService.ts",
+ "properties": [
+ {
+ "name": "notificationChanged$",
+ "defaultValue": "this.notificationChangedSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 16,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "notificationChangedSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 15,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "notifications",
+ "defaultValue": "[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Notification[]",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 14
+ },
+ {
+ "name": "setGlobalMessage$",
+ "defaultValue": "this.setGlobalMessageSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 18,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "setGlobalMessageSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 17,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "setIsJSONValid$",
+ "defaultValue": "this.setIsJSONValidSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 20,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "setIsJSONValidSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 19,
+ "modifierKind": [
+ 123
+ ]
+ },
+ {
+ "name": "viewCurrentAmbientNotification$",
+ "defaultValue": "this.viewCurrentAmbientNotificationSource.asObservable()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Observable",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 22,
+ "modifierKind": [
+ 125
+ ]
+ },
+ {
+ "name": "viewCurrentAmbientNotificationSource",
+ "defaultValue": "new Subject()",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "type": "Subject",
+ "indexKey": "",
+ "optional": false,
+ "description": "",
+ "line": 21,
+ "modifierKind": [
+ 123
+ ]
+ }
+ ],
+ "methods": [
+ {
+ "name": "addNotification",
+ "args": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 412,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastNotificationChanged",
+ "args": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 434,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastSetGlobalMessage",
+ "args": [
+ {
+ "name": "args",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 461,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastSetIsJSONValid",
+ "args": [
+ {
+ "name": "args",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 465,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "broadcastViewCurrentAmbientNotification",
+ "args": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 469,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "args",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "createNewNotification",
+ "args": [
+ {
+ "name": "runId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "notificationType",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "nodeId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "componentId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "fromWorkgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "toWorkgroupId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "message",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "data",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ },
+ {
+ "name": "groupId",
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null"
+ }
+ ],
+ "optional": false,
+ "returnType": "Notification",
+ "typeParameters": [],
+ "line": 45,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nCreates a new notification object\n",
+ "description": "Creates a new notification object
\n",
+ "jsdoctags": [
+ {
+ "name": "runId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": {
+ "pos": 1698,
+ "end": 1714,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "notificationType"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1692,
+ "end": 1697,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "type of notification [component, node, annotation, etc]
\n"
+ },
+ {
+ "name": {
+ "pos": 1783,
+ "end": 1789,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "nodeId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1777,
+ "end": 1782,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "id of node
\n"
+ },
+ {
+ "name": {
+ "pos": 1813,
+ "end": 1824,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "componentId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1807,
+ "end": 1812,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "id of component
\n"
+ },
+ {
+ "name": {
+ "pos": 1853,
+ "end": 1868,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "fromWorkgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1847,
+ "end": 1852,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "id of workgroup that created this notification
\n"
+ },
+ {
+ "name": {
+ "pos": 1928,
+ "end": 1941,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "toWorkgroupId"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1922,
+ "end": 1927,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "id of workgroup this notification is for
\n"
+ },
+ {
+ "name": {
+ "pos": 1995,
+ "end": 2002,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "message"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 1989,
+ "end": 1994,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "notification message
\n"
+ },
+ {
+ "name": {
+ "pos": 2036,
+ "end": 2040,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "data"
+ },
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "pos": 2030,
+ "end": 2035,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "other extra information about this notification
\n"
+ },
+ {
+ "name": {
+ "pos": 2101,
+ "end": 2108,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "groupId"
+ },
+ "type": "null",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "null",
+ "tagName": {
+ "pos": 2095,
+ "end": 2100,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "id that groups multiple notifications together
\n"
+ },
+ {
+ "tagName": {
+ "pos": 2162,
+ "end": 2169,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "newly created notification object
\n"
+ }
+ ]
+ },
+ {
+ "name": "dismissNotification",
+ "args": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 262,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "dismissNotifications",
+ "args": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 284,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "displayAmbientNotification",
+ "args": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 425,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getActiveNotifications",
+ "args": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Notification[]",
+ "typeParameters": [],
+ "line": 314,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getActiveNotificationsWithSameSource",
+ "args": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "notificationToCompare",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Notification[]",
+ "typeParameters": [],
+ "line": 273,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "notificationToCompare",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getAlertNotifications",
+ "args": [
+ {
+ "name": "args",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 386,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nReturns all CRaterResult notifications for given parameters\nTODO: expand to encompass other notification types that should be shown in classroom monitor\n",
+ "description": "Returns all CRaterResult notifications for given parameters\nTODO: expand to encompass other notification types that should be shown in classroom monitor
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 14227,
+ "end": 14231,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "args"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 14221,
+ "end": 14226,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "object of optional parameters to filter on (e.g. nodeId, componentId, toWorkgroupId, fromWorkgroupId, periodId)
\n"
+ },
+ {
+ "tagName": {
+ "pos": 14350,
+ "end": 14357,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "array of cRater notificaitons
\n"
+ }
+ ]
+ },
+ {
+ "name": "getDismissedNotifications",
+ "args": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Notification[]",
+ "typeParameters": [],
+ "line": 335,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getDismissedNotificationsForWorkgroup",
+ "args": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Notification[]",
+ "typeParameters": [],
+ "line": 324,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getLatestActiveNotificationsFromUniqueSource",
+ "args": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Notification[]",
+ "typeParameters": [],
+ "line": 295,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getLatestUniqueSourceNotifications",
+ "args": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Notification[]",
+ "typeParameters": [],
+ "line": 339,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getNewNotifications",
+ "args": [],
+ "optional": false,
+ "returnType": "any[]",
+ "typeParameters": [],
+ "line": 107,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "getNotifications",
+ "args": [
+ {
+ "name": "args",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "{}",
+ "typeParameters": [],
+ "line": 368,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nReturns all notifications for the given parameters\n(e.g. nodeId, componentId, toWorkgroupId, fromWorkgroupId, periodId, type)\n",
+ "description": "Returns all notifications for the given parameters\n(e.g. nodeId, componentId, toWorkgroupId, fromWorkgroupId, periodId, type)
\n",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 13544,
+ "end": 13548,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "args"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 13538,
+ "end": 13543,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "object of optional parameters to filter on\n(e.g. nodeId, componentId, toWorkgroupId, fromWorkgroupId, periodId, type)
\n"
+ },
+ {
+ "tagName": {
+ "pos": 13678,
+ "end": 13685,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "returns"
+ },
+ "comment": "array of notificaitons
\n"
+ }
+ ]
+ },
+ {
+ "name": "getNotificationsSentToWorkgroup",
+ "args": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "Notification[]",
+ "typeParameters": [],
+ "line": 307,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "notifications",
+ "type": "Notification[]",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "workgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getSourceKey",
+ "args": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "string",
+ "typeParameters": [],
+ "line": 353,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hideJSONValidMessage",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 446,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "isActiveNotification",
+ "args": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "boolean",
+ "typeParameters": [],
+ "line": 320,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "pretendServerRequest",
+ "args": [
+ {
+ "name": "notification",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 358,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "notification",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "retrieveNotifications",
+ "args": [],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 84,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "saveNotificationToServer",
+ "args": [
+ {
+ "name": "notification",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 249,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notification",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "sendNotificationForScore",
+ "args": [
+ {
+ "name": "notificationForScore",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 174,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notificationForScore",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "sendNotificationToUser",
+ "args": [
+ {
+ "name": "notificationMessageTemplate",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "fromWorkgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "notificationForScore",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "runId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "periodId",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "notificationType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "toWorkgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "notificationData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "notificationGroupId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "any",
+ "typeParameters": [],
+ "line": 219,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "modifierKind": [
+ 123
+ ],
+ "jsdoctags": [
+ {
+ "name": "notificationMessageTemplate",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "fromWorkgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "notificationForScore",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "runId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "periodId",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "notificationType",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "toWorkgroupId",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "notificationData",
+ "type": "any",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "notificationGroupId",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "setIsJSONValidMessage",
+ "args": [
+ {
+ "name": "isJSONValid",
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 457,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "rawdescription": "\n\nShow the message in the toolbar that says \"JSON Valid\" or \"JSON Invalid\".\ntrue if we want to show \"JSON Valid\"\nfalse if we want to show \"JSON Invalid\"\nnull if we don't want to show anything\n",
+ "description": "Show the message in the toolbar that says "JSON Valid" or "JSON Invalid".\ntrue if we want to show "JSON Valid"\nfalse if we want to show "JSON Invalid"\nnull if we don't want to show anything
\n",
+ "jsdoctags": [
+ {
+ "name": {
+ "pos": 16511,
+ "end": 16522,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "isJSONValid"
+ },
+ "type": "unknown",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "pos": 16505,
+ "end": 16510,
+ "kind": 80,
+ "id": 0,
+ "flags": 16842752,
+ "transformFlags": 0,
+ "escapedText": "param"
+ },
+ "comment": "true if we want to show "JSON Valid"\nfalse if we want to show "JSON Invalid"\nnull if we don't want to show anything
\n"
+ }
+ ]
+ },
+ {
+ "name": "setNotificationNodePositionAndTitle",
+ "args": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 167,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "notification",
+ "type": "Notification",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "showJSONInvalidMessage",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 442,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "showJSONValidMessage",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 438,
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "showSavedMessage",
+ "args": [
+ {
+ "name": "message",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": ""
+ },
+ {
+ "name": "timeout",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "500"
+ }
+ ],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 483,
+ "deprecated": false,
+ "deprecationMessage": "",
+ "jsdoctags": [
+ {
+ "name": "message",
+ "type": "string",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "tagName": {
+ "text": "param"
+ }
+ },
+ {
+ "name": "timeout",
+ "type": "number",
+ "deprecated": false,
+ "deprecationMessage": "",
+ "defaultValue": "500",
+ "tagName": {
+ "text": "param"
+ }
+ }
+ ]
+ },
+ {
+ "name": "showSavingMessage",
+ "args": [],
+ "optional": false,
+ "returnType": "void",
+ "typeParameters": [],
+ "line": 473,
+ "deprecated": false,
+ "deprecationMessage": ""
+ }
+ ],
+ "deprecated": false,
+ "deprecationMessage": "",
+ "description": "",
+ "rawdescription": "\n",
+ "sourceCode": "import { Injectable } from '@angular/core';\nimport { HttpClient, HttpParams } from '@angular/common/http';\nimport { ConfigService } from './configService';\nimport { ProjectService } from './projectService';\nimport { Notification } from '../../../app/domain/notification';\nimport { Observable, Subject } from 'rxjs';\nimport { AnnotationService } from './annotationService';\nimport { DismissAmbientNotificationDialogComponent } from '../vle/dismiss-ambient-notification-dialog/dismiss-ambient-notification-dialog.component';\nimport { MatDialog } from '@angular/material/dialog';\nimport { generateRandomKey } from '../common/string/string';\n\n@Injectable()\nexport class NotificationService {\n notifications: Notification[] = [];\n private notificationChangedSource: Subject = new Subject();\n public notificationChanged$: Observable = this.notificationChangedSource.asObservable();\n private setGlobalMessageSource: Subject = new Subject();\n public setGlobalMessage$: Observable = this.setGlobalMessageSource.asObservable();\n private setIsJSONValidSource: Subject = new Subject();\n public setIsJSONValid$: Observable = this.setIsJSONValidSource.asObservable();\n private viewCurrentAmbientNotificationSource: Subject = new Subject();\n public viewCurrentAmbientNotification$: Observable