From 6d32a437351ae823c096eaa4034813db0d84077a Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Thu, 19 Oct 2023 16:47:41 -0700 Subject: [PATCH 01/21] refactor(AnnotationService): getLatestCommentAnnotation() --- .../wise5/services/annotationService.ts | 105 ++++++------------ src/messages.xlf | 6 +- 2 files changed, 36 insertions(+), 75 deletions(-) diff --git a/src/assets/wise5/services/annotationService.ts b/src/assets/wise5/services/annotationService.ts index d14691f6b0b..7fb687dbfa7 100644 --- a/src/assets/wise5/services/annotationService.ts +++ b/src/assets/wise5/services/annotationService.ts @@ -440,28 +440,15 @@ export class AnnotationService { * @return object containing the component's latest score and comment annotations */ getLatestComponentAnnotations( - nodeId, - componentId, - workgroupId, + nodeId: string, + componentId: string, + workgroupId: number, scoreType: 'score' | 'autoScore' | 'any' = 'any', - commentType = null - ) { - let latestScoreAnnotation = this.getLatestScoreAnnotation( - nodeId, - componentId, - workgroupId, - scoreType - ); - let latestCommentAnnotation = this.getLatestCommentAnnotation( - nodeId, - componentId, - workgroupId, - commentType - ); - + commentType: 'comment' | 'autoComment' | 'any' = 'any' + ): any { return { - score: latestScoreAnnotation, - comment: latestCommentAnnotation + score: this.getLatestScoreAnnotation(nodeId, componentId, workgroupId, scoreType), + comment: this.getLatestCommentAnnotation(nodeId, componentId, workgroupId, commentType) }; } @@ -574,59 +561,33 @@ export class AnnotationService { return false; } - /** - * Get the latest comment annotation - * @param nodeId the node id - * @param componentId the component id - * @param workgroupId the workgroup id - * @param commentType (optional) the type of comment - * e.g. - * 'autoComment' for auto graded comment - * 'comment' for teacher graded comment - * 'any' for auto graded comment or teacher graded comment - * @returns the latest comment annotation - */ - getLatestCommentAnnotation(nodeId, componentId, workgroupId, commentType) { - let annotation = null; - const annotations = this.getAnnotations(); - - if (commentType == null) { - commentType = 'any'; - } - - for (let a = annotations.length - 1; a >= 0; a--) { - const tempAnnotation = annotations[a]; - if (tempAnnotation != null) { - let acceptAnnotation = false; - const tempNodeId = tempAnnotation.nodeId; - const tempComponentId = tempAnnotation.componentId; - const tempToWorkgroupId = tempAnnotation.toWorkgroupId; - const tempAnnotationType = tempAnnotation.type; - - if ( - nodeId == tempNodeId && - componentId == tempComponentId && - workgroupId == tempToWorkgroupId - ) { - if ( - commentType === 'any' && - (tempAnnotationType === 'autoComment' || tempAnnotationType === 'comment') - ) { - acceptAnnotation = true; - } else if (commentType === 'autoComment' && tempAnnotationType === 'autoComment') { - acceptAnnotation = true; - } else if (commentType === 'comment' && tempAnnotationType === 'comment') { - acceptAnnotation = true; - } + getLatestCommentAnnotation( + nodeId: string, + componentId: string, + workgroupId: number, + commentType: 'comment' | 'autoComment' | 'any' = 'any' + ): Annotation { + return ( + this.getAnnotations() + .filter( + (annotation) => + annotation.nodeId == nodeId && + annotation.componentId == componentId && + annotation.toWorkgroupId == workgroupId && + this.matchesCommentType(annotation, commentType) + ) + .at(-1) || null + ); + } - if (acceptAnnotation) { - annotation = tempAnnotation; - break; - } - } - } - } - return annotation; + private matchesCommentType( + annotation: Annotation, + commentType: 'comment' | 'autoComment' | 'any' + ): boolean { + return ( + (commentType === 'any' && ['autoComment', 'comment'].includes(annotation.type)) || + annotation.type === commentType + ); } getScoreValueFromScoreAnnotation(scoreAnnotation: any): number { diff --git a/src/messages.xlf b/src/messages.xlf index 420d13b1fd7..d4e1e3981d6 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -20968,21 +20968,21 @@ If this problem continues, let your teacher know and move on to the next activit Sorry, you cannot view this item yet. src/assets/wise5/services/studentNodeService.ts - 39 + 40 Item Locked src/assets/wise5/services/studentNodeService.ts - 43 + 44 <p>To visit <b></b> you need to:</p><ul> src/assets/wise5/services/studentNodeService.ts - 50 + 51 From eca7ddbc05e22ef17b8ca6be99ab3858d4c209fc Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 20 Oct 2023 10:12:02 -0700 Subject: [PATCH 02/21] refactor(StudentDataService): Clean up code (#1480) --- src/app/services/studentDataService.spec.ts | 45 -------------- .../wise5/services/studentDataService.ts | 60 ++++--------------- 2 files changed, 13 insertions(+), 92 deletions(-) diff --git a/src/app/services/studentDataService.spec.ts b/src/app/services/studentDataService.spec.ts index 4cad90753b4..fb4534679c0 100644 --- a/src/app/services/studentDataService.spec.ts +++ b/src/app/services/studentDataService.spec.ts @@ -39,11 +39,9 @@ describe('StudentDataService', () => { shouldCheckIsComponentSubmitDirty(); shouldGetLatestComponentStateByNodeIdAndComponentId(); shouldGetLatestSubmitComponentState(); - shouldGetStudentWorkByStudentWorkId(); shouldGetComponentStatesByNodeId(); shouldGetComponentStatesByNodeIdAndComponentId(); shouldGetEventsByNodeId(); - shouldGetEventsByNodeIdAndComponentId(); shouldGetLatestNodeEnteredEventNodeIdWithExistingNode(); shouldCalculateCanVisitNode(); shouldGetNodeStatusByNodeId(); @@ -408,31 +406,6 @@ function shouldGetLatestSubmitComponentState() { }); } -function shouldGetStudentWorkByStudentWorkId() { - it('should get student work by student work id with an id that does not exist', () => { - service.studentData = { - componentStates: [ - createComponentState(1, 'node1', 'component1'), - createComponentState(2, 'node2', 'component2'), - createComponentState(3, 'node3', 'component3') - ] - }; - const componentState = service.getStudentWorkByStudentWorkId(4); - expect(componentState).toEqual(null); - }); - it('should get student work by student work id with an id that does exist', () => { - service.studentData = { - componentStates: [ - createComponentState(1, 'node1', 'component1'), - createComponentState(2, 'node1', 'component1'), - createComponentState(3, 'node1', 'component1') - ] - }; - const componentState = service.getStudentWorkByStudentWorkId(2); - expect(componentState.id).toEqual(2); - }); -} - function shouldGetComponentStatesByNodeId() { it('should get component states by node id', () => { service.studentData = { @@ -489,24 +462,6 @@ function shouldGetEventsByNodeId() { }); } -function shouldGetEventsByNodeIdAndComponentId() { - it('should get events by node id and component id', () => { - service.studentData = { - events: [ - createEvent(1, 'node1', 'component1'), - createEvent(2, 'node1', 'component2'), - createEvent(3, 'node2', 'component3'), - createEvent(4, 'node3', 'component4'), - createEvent(5, 'node1', 'component1') - ] - }; - const events = service.getEventsByNodeIdAndComponentId('node1', 'component1'); - expect(events.length).toEqual(2); - expect(events[0].id).toEqual(1); - expect(events[1].id).toEqual(5); - }); -} - function shouldGetLatestNodeEnteredEventNodeIdWithExistingNode() { it('should get latest node entered event node id with existing node', () => { service.studentData = { diff --git a/src/assets/wise5/services/studentDataService.ts b/src/assets/wise5/services/studentDataService.ts index bdc6ff0711a..981d7e7b5a3 100644 --- a/src/assets/wise5/services/studentDataService.ts +++ b/src/assets/wise5/services/studentDataService.ts @@ -551,63 +551,29 @@ export class StudentDataService extends DataService { return null; } - getStudentWorkByStudentWorkId(studentWorkId) { - for (const componentState of this.studentData.componentStates) { - if (componentState.id === studentWorkId) { - return componentState; - } - } - return null; - } - - getComponentStates() { + getComponentStates(): any[] { return this.studentData.componentStates; } - getComponentStatesByNodeId(nodeId) { - const componentStatesByNodeId = []; - for (const componentState of this.studentData.componentStates) { - if (componentState.nodeId === nodeId) { - componentStatesByNodeId.push(componentState); - } - } - return componentStatesByNodeId; + getComponentStatesByNodeId(nodeId: string): any[] { + return this.studentData.componentStates.filter( + (componentState) => componentState.nodeId === nodeId + ); } - getComponentStatesByNodeIdAndComponentId(nodeId, componentId) { - const componentStatesByNodeIdAndComponentId = []; - for (const componentState of this.studentData.componentStates) { - if (componentState.nodeId === nodeId && componentState.componentId === componentId) { - componentStatesByNodeIdAndComponentId.push(componentState); - } - } - return componentStatesByNodeIdAndComponentId; + getComponentStatesByNodeIdAndComponentId(nodeId: string, componentId: string): any[] { + return this.studentData.componentStates.filter( + (componentState) => + componentState.nodeId === nodeId && componentState.componentId === componentId + ); } - getEvents() { + getEvents(): any[] { return this.studentData.events; } - getEventsByNodeId(nodeId) { - const eventsByNodeId = []; - const events = this.studentData.events; - for (const event of events) { - if (event.nodeId === nodeId) { - eventsByNodeId.push(event); - } - } - return eventsByNodeId; - } - - getEventsByNodeIdAndComponentId(nodeId, componentId) { - const eventsByNodeId = []; - const events = this.studentData.events; - for (const event of events) { - if (event.nodeId === nodeId && event.componentId === componentId) { - eventsByNodeId.push(event); - } - } - return eventsByNodeId; + getEventsByNodeId(nodeId: string): any[] { + return this.studentData.events.filter((event) => event.nodeId === nodeId); } /** From 7f12dc0e5d50fb2953d69099fc8928216f6a372a Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 20 Oct 2023 15:15:28 -0700 Subject: [PATCH 03/21] feat(Unit Authoring): Move advanced settings button to side menu #1478 (#1479) --- .../advanced-project-authoring.component.html | 12 ---- .../authoringTool/authoring-tool.component.ts | 7 ++ .../project-authoring.component.html | 12 ---- .../project-authoring.component.ts | 4 -- src/messages.xlf | 68 +++++++++---------- 5 files changed, 39 insertions(+), 64 deletions(-) diff --git a/src/assets/wise5/authoringTool/advanced/advanced-project-authoring.component.html b/src/assets/wise5/authoringTool/advanced/advanced-project-authoring.component.html index 82b660bc530..5c685989f35 100644 --- a/src/assets/wise5/authoringTool/advanced/advanced-project-authoring.component.html +++ b/src/assets/wise5/authoringTool/advanced/advanced-project-authoring.component.html @@ -1,16 +1,4 @@
- - - - - - - - -
+
+ + + + + +
- -
-
+
+ -
- +
+ +

+ call_split - -

-
- -

- call_split - block - block - message -

-
+ block + block + message +

- +
Unused Lessons
There are no Unused Lessons
Unused Lessons branchPathStepHeader: isNodeInAnyBranchPath(inactiveNode.id) && !isGroupNode(inactiveNode.id) }" - class="projectItem" + class="pointer projectItem" + (click)="nodeClicked(inactiveNode.id)" > -
- - -
-
+ +
-
- - -
-
+ +
@@ -219,32 +201,29 @@
Unused Steps
-
- - -
-
+ +
@@ -253,4 +232,3 @@
Unused Steps
-
diff --git a/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.scss b/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.scss index 13e78e75400..43c973327e5 100644 --- a/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.scss +++ b/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.scss @@ -65,6 +65,7 @@ .projectItemTitleDiv { width: 100%; + font-weight: initial; } .multiLineTooltip { diff --git a/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts b/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts index c6771bffc4c..e54d6212fad 100644 --- a/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts +++ b/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts @@ -52,6 +52,7 @@ export class ProjectAuthoringComponent { private refreshProject(): void { this.projectService.parseProject(); this.items = this.projectService.getNodesInOrder(); + this.items.shift(); // remove the 'group0' master root node from consideration this.inactiveGroupNodes = this.projectService.getInactiveGroupNodes(); this.inactiveStepNodes = this.projectService.getInactiveStepNodes(); this.inactiveNodes = this.projectService.getInactiveNodes(); @@ -63,14 +64,6 @@ export class ProjectAuthoringComponent { window.open(`${this.configService.getConfigParam('previewProjectURL')}`); } - protected getNodePositionById(nodeId: string): string { - return this.projectService.getNodePositionById(nodeId); - } - - protected getNodeTitle(nodeId: string): string { - return this.projectService.getNodeTitle(nodeId); - } - protected isGroupNode(nodeId: string): boolean { return this.projectService.isGroupNode(nodeId); } @@ -153,10 +146,6 @@ export class ProjectAuthoringComponent { return this.projectService.isNodeInAnyBranchPath(nodeId); } - /** - * Temporarily highlight the new nodes to draw attention to them - * @param newNodes the new nodes to highlight - */ private temporarilyHighlightNewNodes(newNodes = []): void { if (newNodes.length > 0) { setTimeout(() => { @@ -200,7 +189,7 @@ export class ProjectAuthoringComponent { * The checkbox for a node was clicked. We do not allow selecting a mix of group and step nodes. * If any group nodes are selected, disable all step node checkboxes, and vise-versa. */ - protected selectNode(): void { + protected selectNode($event: Event): void { const checkedNodes = this.items .concat(Object.values(this.idToNode)) .filter((item) => item.checked); @@ -211,6 +200,7 @@ export class ProjectAuthoringComponent { this.groupNodeSelected = this.isGroupNode(checkedNodes[0].id); this.stepNodeSelected = !this.groupNodeSelected; } + $event.stopPropagation(); } protected isBranchPoint(nodeId: string): boolean { diff --git a/src/messages.xlf b/src/messages.xlf index d30360a80f9..112c097cc90 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -717,7 +717,7 @@ src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 52 + 51 src/assets/wise5/components/animation/animation-authoring/animation-authoring.component.html @@ -1455,7 +1455,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 62 + 61 src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html @@ -5402,7 +5402,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 41 + 40 src/assets/wise5/authoringTool/project-list/project-list.component.html @@ -9685,7 +9685,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 150 + 141 @@ -9700,7 +9700,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 217 + 199 @@ -9715,7 +9715,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 218 + 200 @@ -12077,69 +12077,94 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Add New Lesson src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 8 + 7 Add New Step src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 19 + 18 Move src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 30 + 29 - + + Select lesson or step + + src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html + 90 + + + Branch point with paths based on + getBranchCriteriaDescription(item.key) + }}"/> src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 109,111 + 101,103 - + Constraint\n\n + getConstraintDescriptions(item.key) + }}"/> src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 119,121 + 111,113 - + Constraints\n\n + getConstraintDescriptions(item.key) + }}"/> src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 129,131 + 121,123 Has Rubric src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 138 + 130 + + + + Select lesson + + src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html + 160 + + + + Select step + + src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html + 186 + + + src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html + 222 Are you sure you want to delete the selected item? src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts - 106 + 99 Are you sure you want to delete the selected items? src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts - 107 + 100 From fd101073e4406b26fc9d05914f3a560523c14e82 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Tue, 24 Oct 2023 10:29:22 -0700 Subject: [PATCH 07/21] refactor(Discussion): Extract common function to show/hide posts (#1485) --- .../discussion-show-work.component.html | 4 +- .../discussion-show-work.component.ts | 41 ++++--------------- 2 files changed, 10 insertions(+), 35 deletions(-) diff --git a/src/assets/wise5/components/discussion/discussion-show-work/discussion-show-work.component.html b/src/assets/wise5/components/discussion/discussion-show-work/discussion-show-work.component.html index 0bc605789df..0086ecf9a9a 100644 --- a/src/assets/wise5/components/discussion/discussion-show-work/discussion-show-work.component.html +++ b/src/assets/wise5/components/discussion/discussion-show-work/discussion-show-work.component.html @@ -5,8 +5,8 @@ [response]="componentState" [numReplies]="componentState.replies.length" [mode]="'grading'" - (deleteButtonClicked)="deleteButtonClicked($event)" - (undoDeleteButtonClicked)="undoDeleteButtonClicked($event)" + (deleteButtonClicked)="hidePost($event)" + (undoDeleteButtonClicked)="showPost($event)" [isDisabled]="true" class="post" > diff --git a/src/assets/wise5/components/discussion/discussion-show-work/discussion-show-work.component.ts b/src/assets/wise5/components/discussion/discussion-show-work/discussion-show-work.component.ts index 80fcd6b7cd5..d311c5f3e87 100644 --- a/src/assets/wise5/components/discussion/discussion-show-work/discussion-show-work.component.ts +++ b/src/assets/wise5/components/discussion/discussion-show-work/discussion-show-work.component.ts @@ -107,37 +107,8 @@ export class DiscussionShowWorkComponent extends ComponentShowWorkDirective { * the class from seeing the post. * @param componentState the student component state the teacher wants to delete. */ - deleteButtonClicked(componentState: any): void { - const toWorkgroupId = componentState.workgroupId; - const userInfo = this.ConfigService.getUserInfoByWorkgroupId(toWorkgroupId); - const periodId = userInfo.periodId; - const teacherUserInfo = this.ConfigService.getMyUserInfo(); - const fromWorkgroupId = teacherUserInfo.workgroupId; - const runId = this.ConfigService.getRunId(); - const nodeId = this.nodeId; - const componentId = this.componentId; - const studentWorkId = componentState.id; - const data = { - action: 'Delete' - }; - const annotation = this.AnnotationService.createInappropriateFlagAnnotation( - runId, - periodId, - nodeId, - componentId, - fromWorkgroupId, - toWorkgroupId, - studentWorkId, - data - ); - this.AnnotationService.saveAnnotation(annotation).then(() => { - const componentStates = this.TeacherDiscussionService.getPostsAssociatedWithComponentIdsAndWorkgroupId( - this.getGradingComponentIds(), - this.workgroupId - ); - const annotations = this.getInappropriateFlagAnnotationsByComponentStates(componentStates); - this.setClassResponses(componentStates, annotations); - }); + protected hidePost(componentState: any): void { + this.flagPost(componentState, 'Delete'); } /** @@ -146,7 +117,11 @@ export class DiscussionShowWorkComponent extends ComponentShowWorkDirective { * This will make the post visible to the students. * @param componentState the student component state the teacher wants to show again. */ - undoDeleteButtonClicked(componentState: any): any { + protected showPost(componentState: any): void { + this.flagPost(componentState, 'Undo Delete'); + } + + private flagPost(componentState: any, action: 'Delete' | 'Undo Delete'): void { const toWorkgroupId = componentState.workgroupId; const userInfo = this.ConfigService.getUserInfoByWorkgroupId(toWorkgroupId); const periodId = userInfo.periodId; @@ -157,7 +132,7 @@ export class DiscussionShowWorkComponent extends ComponentShowWorkDirective { const componentId = this.componentId; const studentWorkId = componentState.id; const data = { - action: 'Undo Delete' + action: action }; const annotation = this.AnnotationService.createInappropriateFlagAnnotation( runId, From 2a75a5a9652a350fb93ecc94751cd95e140ccdd0 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Tue, 24 Oct 2023 11:34:22 -0700 Subject: [PATCH 08/21] refactor(AnnotationService): Move isThereAnyScoreAnnotation() to NodeInfo (#1484) --- .../shared/node-info/node-info.component.ts | 13 +++++++- .../wise5/services/annotationService.ts | 33 +++++-------------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/node-info/node-info.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/node-info/node-info.component.ts index adc9a24d0a2..3d392db86dd 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/node-info/node-info.component.ts +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/node-info/node-info.component.ts @@ -6,6 +6,7 @@ import { ComponentTypeService } from '../../../../services/componentTypeService' import { TeacherDataService } from '../../../../services/teacherDataService'; import { TeacherProjectService } from '../../../../services/teacherProjectService'; import { ComponentFactory } from '../../../../common/ComponentFactory'; +import { isMatchingPeriods } from '../../../../common/period/period'; @Component({ selector: 'node-info', @@ -49,7 +50,7 @@ export class NodeInfoComponent { component.hasScoresSummary = this.summaryService.isScoresSummaryAvailableForComponentType( component.type ); - component.hasScoreAnnotation = this.annotationService.isThereAnyScoreAnnotation( + component.hasScoreAnnotation = this.hasScoreAnnotation( this.nodeId, component.id, this.periodId @@ -66,6 +67,16 @@ export class NodeInfoComponent { } } + private hasScoreAnnotation(nodeId: string, componentId: string, periodId: number): boolean { + return this.annotationService + .getAnnotationsByNodeIdComponentId(nodeId, componentId) + .some( + (annotation) => + isMatchingPeriods(annotation.periodId, periodId) && + ['score', 'autoScore'].includes(annotation.type) + ); + } + private componentHasCorrectAnswer(component: any): boolean { const service = this.componentServiceLookupService.getService(component.type); return service.componentHasCorrectAnswer(component); diff --git a/src/assets/wise5/services/annotationService.ts b/src/assets/wise5/services/annotationService.ts index f5c3191e4e5..7e9c58b2715 100644 --- a/src/assets/wise5/services/annotationService.ts +++ b/src/assets/wise5/services/annotationService.ts @@ -5,7 +5,6 @@ import { ProjectService } from './projectService'; import { ConfigService } from './configService'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Observable, Subject } from 'rxjs'; -import { isMatchingPeriods } from '../common/period/period'; import { generateRandomKey } from '../common/string/string'; import { Annotation } from '../common/Annotation'; @@ -32,6 +31,12 @@ export class AnnotationService { return this.annotations.find((annotation) => annotation.id === annotationId) || null; } + getAnnotationsByNodeIdComponentId(nodeId: string, componentId: string): Annotation[] { + return this.annotations.filter( + (annotation) => annotation.nodeId === nodeId && annotation.componentId === componentId + ); + } + /** * Get the latest annotation with the given params * @param params an object containing the params to match @@ -515,13 +520,10 @@ export class AnnotationService { scoreType: 'score' | 'autoScore' | 'any' = 'any' ): Annotation { return ( - this.getAnnotations() + this.getAnnotationsByNodeIdComponentId(nodeId, componentId) .filter( (annotation) => - annotation.nodeId == nodeId && - annotation.componentId == componentId && - annotation.toWorkgroupId == workgroupId && - this.matchesScoreType(annotation, scoreType) + annotation.toWorkgroupId == workgroupId && this.matchesScoreType(annotation, scoreType) ) .at(-1) || null ); @@ -537,21 +539,6 @@ export class AnnotationService { ); } - isThereAnyScoreAnnotation(nodeId, componentId, periodId) { - const annotations = this.getAnnotations(); - for (const annotation of annotations) { - if ( - annotation.nodeId === nodeId && - annotation.componentId === componentId && - isMatchingPeriods(annotation.periodId, periodId) && - this.isScoreOrAutoScore(annotation) - ) { - return true; - } - } - return false; - } - getLatestCommentAnnotation( nodeId: string, componentId: string, @@ -559,11 +546,9 @@ export class AnnotationService { commentType: 'comment' | 'autoComment' | 'any' = 'any' ): Annotation { return ( - this.getAnnotations() + this.getAnnotationsByNodeIdComponentId(nodeId, componentId) .filter( (annotation) => - annotation.nodeId == nodeId && - annotation.componentId == componentId && annotation.toWorkgroupId == workgroupId && this.matchesCommentType(annotation, commentType) ) From 19829fa29790eb9abede004fcbc849716bbbcad3 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Wed, 25 Oct 2023 09:58:24 -0700 Subject: [PATCH 09/21] feat(AuthoringTool): Move preview unit button to top bar (#1486) Co-authored-by: Jonathan Lim-Breitbart --- .../components/top-bar/top-bar.component.html | 5 +- .../components/top-bar/top-bar.component.ts | 4 ++ .../project-authoring.component.html | 10 ---- .../project-authoring.component.ts | 6 --- src/messages.xlf | 46 +++++++++---------- 5 files changed, 28 insertions(+), 43 deletions(-) diff --git a/src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html b/src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html index 96b713973e4..25313bd8383 100644 --- a/src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html +++ b/src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html @@ -18,12 +18,13 @@

> info + -

diff --git a/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts b/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts index e54d6212fad..cc2c3e88384 100644 --- a/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts +++ b/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts @@ -1,5 +1,4 @@ import { Component } from '@angular/core'; -import { ConfigService } from '../../services/configService'; import { DeleteNodeService } from '../../services/deleteNodeService'; import { TeacherProjectService } from '../../services/teacherProjectService'; import { TeacherDataService } from '../../services/teacherDataService'; @@ -25,7 +24,6 @@ export class ProjectAuthoringComponent { private subscriptions: Subscription = new Subscription(); constructor( - private configService: ConfigService, private deleteNodeService: DeleteNodeService, private projectService: TeacherProjectService, private dataService: TeacherDataService, @@ -60,10 +58,6 @@ export class ProjectAuthoringComponent { this.unselectAllItems(); } - protected previewProject(): void { - window.open(`${this.configService.getConfigParam('previewProjectURL')}`); - } - protected isGroupNode(nodeId: string): boolean { return this.projectService.isGroupNode(nodeId); } diff --git a/src/messages.xlf b/src/messages.xlf index 112c097cc90..bc0f7c29774 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -1147,7 +1147,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html - 38 + 39 src/assets/wise5/components/common/feedbackRule/edit-feedback-rules/edit-feedback-rules.component.html @@ -1454,8 +1454,8 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.8 - src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 61 + src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html + 21 src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html @@ -9685,7 +9685,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 141 + 131 @@ -9700,7 +9700,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 199 + 189 @@ -9715,7 +9715,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 200 + 190 @@ -9823,25 +9823,21 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Switch to Grading View src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html - 25 - - - src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html - 27 + 28 Help src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html - 43,45 + 44,46 User Menu src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html - 48 + 49 src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html @@ -9852,7 +9848,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. Go Home src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html - 73,75 + 74,76 src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html @@ -9863,7 +9859,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. Sign Out src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html - 77,79 + 78,80 src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html @@ -12098,7 +12094,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Select lesson or step src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 90 + 80 @@ -12107,7 +12103,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 101,103 + 91,93 @@ -12116,7 +12112,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 111,113 + 101,103 @@ -12125,46 +12121,46 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 121,123 + 111,113 Has Rubric src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 130 + 120 Select lesson src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 160 + 150 Select step src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 186 + 176 src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 222 + 212 Are you sure you want to delete the selected item? src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts - 99 + 93 Are you sure you want to delete the selected items? src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts - 100 + 94 From fe3cf2b6df4c81a4aa74dd7be7bd87afbf98f09a Mon Sep 17 00:00:00 2001 From: Geoffrey Kwan Date: Thu, 26 Oct 2023 11:14:26 -0400 Subject: [PATCH 10/21] refactor(Classroom Monitor): Clean up getStudentProjectCompletion() (#1490) * refactor(Classroom Monitor): Clean up getStudentProjectCompletion() * refactor(Classroom Monitor): Remove function accidentally left in * refactor(Classroom Monitor): Remove unnecessary function --- .../student-grading.component.ts | 3 +- .../student-progress.component.ts | 15 +-- src/assets/wise5/common/ProjectCompletion.ts | 5 + .../wise5/services/classroomStatusService.ts | 97 ++++--------------- 4 files changed, 30 insertions(+), 90 deletions(-) create mode 100644 src/assets/wise5/common/ProjectCompletion.ts diff --git a/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts b/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts index 9941423e2f5..60156b4fa83 100644 --- a/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts +++ b/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts @@ -70,8 +70,7 @@ export class StudentGradingComponent implements OnInit { this.maxScore = maxScore ? maxScore : 0; this.totalScore = this.dataService.getTotalScoreByWorkgroupId(this.workgroupId); this.projectCompletion = this.classroomStatusService.getStudentProjectCompletion( - this.workgroupId, - true + this.workgroupId ); this.nodeIds = this.projectService.getFlattenedProjectAsNodeIds(); this.setNodesById(); diff --git a/src/assets/wise5/classroomMonitor/student-progress/student-progress.component.ts b/src/assets/wise5/classroomMonitor/student-progress/student-progress.component.ts index fd40e0937ad..bbcd180f005 100644 --- a/src/assets/wise5/classroomMonitor/student-progress/student-progress.component.ts +++ b/src/assets/wise5/classroomMonitor/student-progress/student-progress.component.ts @@ -53,7 +53,9 @@ export class StudentProgressComponent implements OnInit { private initializeStudents(): void { this.teams = []; - const workgroups = this.configService.getClassmateUserInfos(); + const workgroups = this.configService + .getClassmateUserInfos() + .filter((workgroup: any) => workgroup.workgroupId != null); for (const workgroup of workgroups) { const workgroupId = workgroup.workgroupId; const displayNames = this.configService.getDisplayUsernamesByWorkgroupId(workgroupId); @@ -71,7 +73,7 @@ export class StudentProgressComponent implements OnInit { private updateTeam(workgroupId: number): void { const location = this.getCurrentNodeForWorkgroupId(workgroupId); - const completion = this.getStudentProjectCompletion(workgroupId); + const completion = this.classroomStatusService.getStudentProjectCompletion(workgroupId); const score = this.getStudentTotalScore(workgroupId); let maxScore = this.classroomStatusService.getMaxScoreForWorkgroupId(workgroupId); maxScore = maxScore ? maxScore : 0; @@ -93,15 +95,6 @@ export class StudentProgressComponent implements OnInit { ); } - /** - * Get project completion data for the given workgroup (only include nodes with student work) - * @param workgroupId the workgroup id - * @return object with completed, total, and percent completed (integer between 0 and 100) - */ - private getStudentProjectCompletion(workgroupId: number): any { - return this.classroomStatusService.getStudentProjectCompletion(workgroupId, true); - } - private getStudentTotalScore(workgroupId: number): number { return this.dataService.getTotalScoreByWorkgroupId(workgroupId); } diff --git a/src/assets/wise5/common/ProjectCompletion.ts b/src/assets/wise5/common/ProjectCompletion.ts new file mode 100644 index 00000000000..6f17890dd54 --- /dev/null +++ b/src/assets/wise5/common/ProjectCompletion.ts @@ -0,0 +1,5 @@ +export class ProjectCompletion { + completedItems: number; + completionPct: number; + totalItems: number; +} diff --git a/src/assets/wise5/services/classroomStatusService.ts b/src/assets/wise5/services/classroomStatusService.ts index 186462e2544..8d7a6eba37c 100644 --- a/src/assets/wise5/services/classroomStatusService.ts +++ b/src/assets/wise5/services/classroomStatusService.ts @@ -4,6 +4,8 @@ import { AnnotationService } from './annotationService'; import { ConfigService } from './configService'; import { ProjectService } from './projectService'; import { Observable, Subject, tap } from 'rxjs'; +import { NodeProgress } from '../common/NodeProgress'; +import { ProjectCompletion } from '../common/ProjectCompletion'; @Injectable() export class ClassroomStatusService { @@ -64,16 +66,11 @@ export class ClassroomStatusService { } getStudentStatusForWorkgroupId(workgroupId: number): any { - const studentStatuses = this.getStudentStatuses(); - for (let tempStudentStatus of studentStatuses) { - if (tempStudentStatus != null) { - const tempWorkgroupId = tempStudentStatus.workgroupId; - if (workgroupId === tempWorkgroupId) { - return tempStudentStatus; - } - } - } - return null; + return ( + this.getStudentStatuses().find( + (studentStatus) => studentStatus.workgroupId === workgroupId + ) || null + ); } hasStudentStatus(workgroupId: number): boolean { @@ -96,79 +93,25 @@ export class ClassroomStatusService { } } - /** - * Get the student project completion data by workgroup id - * @param workgroupId the workgroup id - * @param excludeNonWorkNodes boolean whether to exclude nodes without - * @returns object with completed, total, and percent completed (integer - * between 0 and 100) - */ - getStudentProjectCompletion(workgroupId, excludeNonWorkNodes) { - let completion = { - totalItems: 0, - completedItems: 0, - completionPct: 0 - }; - - // get the student status for the workgroup - let studentStatus = this.getStudentStatusForWorkgroupId(workgroupId); - + getStudentProjectCompletion(workgroupId: number): ProjectCompletion { + let completion: ProjectCompletion = new ProjectCompletion(); + const studentStatus = this.getStudentStatusForWorkgroupId(workgroupId); if (studentStatus) { - let projectCompletion = studentStatus.projectCompletion; - - if (projectCompletion) { - if (excludeNonWorkNodes) { - // we're only looking for completion of nodes with work - let completionPctWithWork = projectCompletion.completionPctWithWork; - - if (completionPctWithWork) { - completion.totalItems = projectCompletion.totalItemsWithWork; - completion.completedItems = projectCompletion.completedItemsWithWork; - completion.completionPct = projectCompletion.completionPctWithWork; - } else { - /* - * we have a legacy projectCompletion object that only includes information for all nodes - * so we need to calculate manually - */ - completion = this.getNodeCompletion('group0', -1, workgroupId, true); - } - } else { - completion = projectCompletion; - } + const projectCompletion = studentStatus.projectCompletion; + const completionPctWithWork = projectCompletion.completionPctWithWork; + if (completionPctWithWork) { + completion.totalItems = projectCompletion.totalItemsWithWork; + completion.completedItems = projectCompletion.completedItemsWithWork; + completion.completionPct = projectCompletion.completionPctWithWork; + } else { + // we have a legacy projectCompletion object that only includes information for all nodes so + // we need to calculate completion manually + completion = this.getNodeCompletion('group0', -1, workgroupId, true); } } return completion; } - /** - * Get the workgroups on a node in the given period - * @param nodeId the node id - * @param periodId the period id. pass in -1 to select all periods. - * @returns an array of workgroup ids on a node in a period - */ - getWorkgroupIdsOnNode(nodeId, periodId) { - let workgroupIds = []; - let studentStatuses = this.studentStatuses; - for (let studentStatus of studentStatuses) { - if (studentStatus != null) { - if (periodId === -1 || periodId === studentStatus.periodId) { - let currentNodeId = studentStatus.currentNodeId; - if (nodeId === currentNodeId) { - workgroupIds.push(studentStatus.workgroupId); - } else if (this.projectService.isGroupNode(nodeId)) { - let currentNode = this.projectService.getNodeById(currentNodeId); - let group = this.projectService.getNodeById(nodeId); - - if (this.projectService.isNodeDescendentOfGroup(currentNode, group)) { - workgroupIds.push(studentStatus.workgroupId); - } - } - } - } - } - return workgroupIds; - } - /** * Get node completion info for the given parameters * @param nodeId the node id From 8ce19f4561c17e829383ff03c9f2480fbdb879ea Mon Sep 17 00:00:00 2001 From: Geoffrey Kwan Date: Thu, 26 Oct 2023 11:28:47 -0400 Subject: [PATCH 11/21] fix(Classroom Monitor): Null pointer when exiting workgroup grading view (#1493) --- .../student-grading/student-grading.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts b/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts index 60156b4fa83..76a2775b166 100644 --- a/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts +++ b/src/assets/wise5/classroomMonitor/student-grading/student-grading.component.ts @@ -133,7 +133,7 @@ export class StudentGradingComponent implements OnInit { private subscribeToCurrentWorkgroupChanged(): void { this.subscriptions.add( this.dataService.currentWorkgroupChanged$ - .pipe(filter((workgroup) => workgroup != null)) + .pipe(filter(({ currentWorkgroup }) => currentWorkgroup != null)) .subscribe(({ currentWorkgroup }) => { const workgroupId = currentWorkgroup.workgroupId; if (this.workgroupId !== workgroupId) { From 133546618a94e0ea927cf39762ac07159c64f2bf Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Thu, 26 Oct 2023 13:20:25 -0700 Subject: [PATCH 12/21] style(Preview Button): Change mat-icon value to preview (#1491) --- .../choose-import-step.component.html | 4 +- .../library-project-details.component.html | 2 +- .../student-run-list-item.component.html | 2 +- .../teacher/run-menu/run-menu.component.html | 2 +- ...choose-automated-assessment.component.html | 4 +- .../preview-component-button.component.html | 2 +- .../components/top-bar/top-bar.component.html | 6 +- .../choose-import-component.component.html | 10 +-- .../node-authoring.component.html | 3 +- .../project-list/project-list.component.html | 2 +- .../shared/top-bar/top-bar.component.html | 4 +- src/messages.xlf | 74 ++++++++----------- 12 files changed, 45 insertions(+), 70 deletions(-) diff --git a/src/app/authoring-tool/import-step/choose-import-step/choose-import-step.component.html b/src/app/authoring-tool/import-step/choose-import-step/choose-import-step.component.html index 1dcf5932e25..67fd0d3b55a 100644 --- a/src/app/authoring-tool/import-step/choose-import-step/choose-import-step.component.html +++ b/src/app/authoring-tool/import-step/choose-import-step/choose-import-step.component.html @@ -9,7 +9,7 @@
Choose the step(s) that you want to import, then select Next.
i18n-matTooltip matTooltipPosition="above" > - visibility + preview

i18n-matTooltip matTooltipPosition="above" > - visibility + preview
diff --git a/src/app/modules/library/library-project-details/library-project-details.component.html b/src/app/modules/library/library-project-details/library-project-details.component.html index d1eee0628ab..daa84fd4955 100644 --- a/src/app/modules/library/library-project-details/library-project-details.component.html +++ b/src/app/modules/library/library-project-details/library-project-details.component.html @@ -140,6 +140,6 @@ >
diff --git a/src/app/student/student-run-list-item/student-run-list-item.component.html b/src/app/student/student-run-list-item/student-run-list-item.component.html index 42ad4b7ca25..0eca7804b0d 100644 --- a/src/app/student/student-run-list-item/student-run-list-item.component.html +++ b/src/app/student/student-run-list-item/student-run-list-item.component.html @@ -64,7 +64,7 @@ play_circle_filled Launch diff --git a/src/app/teacher/run-menu/run-menu.component.html b/src/app/teacher/run-menu/run-menu.component.html index 4ae5f012639..97dea0111ea 100644 --- a/src/app/teacher/run-menu/run-menu.component.html +++ b/src/app/teacher/run-menu/run-menu.component.html @@ -10,7 +10,7 @@ Edit Settings - tv + preview Preview diff --git a/src/assets/wise5/authoringTool/addNode/choose-automated-assessment/choose-automated-assessment.component.html b/src/assets/wise5/authoringTool/addNode/choose-automated-assessment/choose-automated-assessment.component.html index 31ba970524a..a0dd1dddf2d 100644 --- a/src/assets/wise5/authoringTool/addNode/choose-automated-assessment/choose-automated-assessment.component.html +++ b/src/assets/wise5/authoringTool/addNode/choose-automated-assessment/choose-automated-assessment.component.html @@ -23,13 +23,11 @@
Choose an assessment item:
mat-raised-button color="primary" (click)="previewNode(item.node)" - aria-label="Preview Step" - i18n-aria-label matTooltip="Preview Step" matTooltipPosition="above" i18n-matTooltip > - visibility + preview
diff --git a/src/assets/wise5/authoringTool/components/preview-component-button/preview-component-button.component.html b/src/assets/wise5/authoringTool/components/preview-component-button/preview-component-button.component.html index d45da87e063..904f679d021 100644 --- a/src/assets/wise5/authoringTool/components/preview-component-button/preview-component-button.component.html +++ b/src/assets/wise5/authoringTool/components/preview-component-button/preview-component-button.component.html @@ -6,5 +6,5 @@ i18n-matTooltip (click)="popUpComponentPreview($event)" > - visibility + preview diff --git a/src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html b/src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html index 25313bd8383..f368fbb5c07 100644 --- a/src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html +++ b/src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html @@ -18,9 +18,6 @@

> info - +

diff --git a/src/assets/wise5/authoringTool/importComponent/choose-import-component/choose-import-component.component.html b/src/assets/wise5/authoringTool/importComponent/choose-import-component/choose-import-component.component.html index 8661c552d0b..a25172e603f 100644 --- a/src/assets/wise5/authoringTool/importComponent/choose-import-component/choose-import-component.component.html +++ b/src/assets/wise5/authoringTool/importComponent/choose-import-component/choose-import-component.component.html @@ -63,7 +63,7 @@

{{ importProject.metadata.title }}

matTooltipPosition="above" i18n-matTooltip > - visibility + preview
color="primary" *ngIf="importItem.node.type !== 'group'" (click)="previewImportNode(importItem.node)" - aria-label="Preview Step" - i18n-aria-label matTooltip="Preview Step" matTooltipPosition="above" i18n-matTooltip > - visibility + preview
color="primary" *ngIf="importItem.node.type !== 'group'" (click)="previewImportNode(importItem.node)" - aria-label="Preview Component" - i18n-aria-label matTooltip="Preview Component" matTooltipPosition="above" i18n-matTooltip > - visibility + preview
diff --git a/src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html b/src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html index 00eb1e69f58..4207b6534f6 100644 --- a/src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html +++ b/src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html @@ -28,14 +28,13 @@ *ngIf="!isGroupNode" mat-raised-button color="primary" - class="top-button" (click)="previewStepInNewWindow()" [disabled]="showEditTransitions" matTooltip="Preview Step" matTooltipPosition="above" i18n-matTooltip > - visibility + preview
diff --git a/src/assets/wise5/authoringTool/project-list/project-list.component.html b/src/assets/wise5/authoringTool/project-list/project-list.component.html index 746baeb3a8c..394e50520a7 100644 --- a/src/assets/wise5/authoringTool/project-list/project-list.component.html +++ b/src/assets/wise5/authoringTool/project-list/project-list.component.html @@ -34,7 +34,7 @@ matTooltipPosition="left" i18n-matTooltip > - pageview + preview diff --git a/src/messages.xlf b/src/messages.xlf index bc0f7c29774..c0910795c5a 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -475,7 +475,7 @@ src/assets/wise5/authoringTool/importComponent/choose-import-component/choose-import-component.component.html - 135 + 131 src/assets/wise5/authoringTool/peer-grouping/create-new-peer-grouping-dialog/create-new-peer-grouping-dialog.component.html @@ -1166,7 +1166,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 161 + 160 src/assets/wise5/components/common/feedbackRule/edit-feedback-rules/edit-feedback-rules.component.html @@ -1455,15 +1455,11 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html - 21 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html - 36 + 31 src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html - 39 + 37
@@ -1476,21 +1472,13 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/assets/wise5/authoringTool/addNode/choose-automated-assessment/choose-automated-assessment.component.html 26 - - src/assets/wise5/authoringTool/addNode/choose-automated-assessment/choose-automated-assessment.component.html - 28 - src/assets/wise5/authoringTool/importComponent/choose-import-component/choose-import-component.component.html 85 - - src/assets/wise5/authoringTool/importComponent/choose-import-component/choose-import-component.component.html - 87 - src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 34 + 33 @@ -1513,7 +1501,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/addNode/choose-automated-assessment/choose-automated-assessment.component.html - 40 + 38 src/assets/wise5/authoringTool/addNode/choose-simulation/choose-simulation.component.html @@ -9777,11 +9765,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/importComponent/choose-import-component/choose-import-component.component.html - 110 - - - src/assets/wise5/authoringTool/importComponent/choose-import-component/choose-import-component.component.html - 112 + 108 @@ -9823,7 +9807,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Switch to Grading View src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html - 28 + 25 @@ -9841,7 +9825,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html - 80 + 78 @@ -9852,7 +9836,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html - 105,107 + 103,105 @@ -9863,7 +9847,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html - 109,111 + 107,109 @@ -10333,7 +10317,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/importComponent/choose-import-component/choose-import-component.component.html - 126 + 122 @@ -11470,105 +11454,105 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 190 + 189 Back to unit src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 45 + 44 Add a new component src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 56 + 55 Components src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 71 + 70 Move Components src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 80 + 79 Copy Components src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 90 + 89 Delete Components src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 100 + 99 + Expand All src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 115,117 + 114,116 - Collapse All src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 124,126 + 123,125 This step does not have any components. Click the + button to add a component. src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 131 + 130 Toggle component authoring src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 153 + 152 Select component src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 170 + 169 Click to expand/collapse src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 181 + 180 Copy Component src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 212 + 211 Delete Component src/assets/wise5/authoringTool/node/node-authoring/node-authoring.component.html - 226 + 225 @@ -13603,7 +13587,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html - 67 + 65 @@ -13761,7 +13745,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html - 48 + 46 src/assets/wise5/vle/notifications-dialog/notifications-dialog.component.html From 5e0b3cbc7136fdfdd480275880ef794f36ef3fc1 Mon Sep 17 00:00:00 2001 From: Geoffrey Kwan Date: Fri, 27 Oct 2023 11:58:32 -0400 Subject: [PATCH 13/21] feat(Export): Include Question Used column in Peer Chat export (#1483) --- .../PeerChatComponentDataExportStrategy.ts | 130 ++++++++++++------ 1 file changed, 87 insertions(+), 43 deletions(-) diff --git a/src/assets/wise5/classroomMonitor/dataExport/strategies/PeerChatComponentDataExportStrategy.ts b/src/assets/wise5/classroomMonitor/dataExport/strategies/PeerChatComponentDataExportStrategy.ts index ded1ac3fc58..98684ae76c4 100644 --- a/src/assets/wise5/classroomMonitor/dataExport/strategies/PeerChatComponentDataExportStrategy.ts +++ b/src/assets/wise5/classroomMonitor/dataExport/strategies/PeerChatComponentDataExportStrategy.ts @@ -25,7 +25,6 @@ export class PeerChatComponentDataExportStrategy extends AbstractDataExportStrat 'Component Part Number', 'Step Title', 'Component Type', - 'Component Prompt', 'Response' ]; @@ -52,55 +51,61 @@ export class PeerChatComponentDataExportStrategy extends AbstractDataExportStrat private generateComponentHeaderRow(component: any, columnNameToNumber: any): string[] { const headerRow = this.defaultColumnNames.map((columnName: string) => columnName); const componentStates = this.teacherDataService.getComponentStatesByComponentId(component.id); - this.insertPrePromptColumnIfNecessary(headerRow, component); - this.insertDynamicPromptColumnIfNecessary(headerRow, componentStates); - this.insertPostPromptColumnIfNecessary(headerRow, component); - this.insertQuestionColumnsIfNecessary(headerRow, componentStates); + this.insertPromptColumns(headerRow, component); + this.insertQuestionColumns(headerRow, component, componentStates); this.populateColumnNameMappings(headerRow, columnNameToNumber); return headerRow; } - private insertPrePromptColumnIfNecessary(headerRow: string[], component: any): void { + private insertPromptColumns(headerRow: string[], component: any): void { + if (!this.hasDynamicPrompt(component)) { + this.insertBeforeResponseColumn(headerRow, 'Prompt'); + } if (this.hasPrePrompt(component)) { - headerRow.splice(headerRow.indexOf('Response'), 0, 'Pre Prompt'); + this.insertBeforeResponseColumn(headerRow, 'Pre Prompt'); + } + if (this.hasDynamicPrompt(component)) { + this.insertBeforeResponseColumn(headerRow, 'Dynamic Prompt'); + } + if (this.hasPostPrompt(component)) { + this.insertBeforeResponseColumn(headerRow, 'Post Prompt'); } } - private insertDynamicPromptColumnIfNecessary(headerRow: string[], componentStates: any[]): void { - if (this.hasDynamicPrompt(componentStates)) { - headerRow.splice(headerRow.indexOf('Response'), 0, 'Dynamic Prompt'); + private insertQuestionColumns(headerRow: string[], component: any, componentStates: any[]): void { + const maxQuestions = this.getMaxQuestionBankCount(componentStates); + if (maxQuestions > 0) { + for (let q = 0; q < maxQuestions; q++) { + this.insertBeforeResponseColumn(headerRow, `Question ${q + 1}`); + } + } + if (this.isClickToUseEnabled(component)) { + this.insertBeforeResponseColumn(headerRow, 'Question Used'); } } - private insertPostPromptColumnIfNecessary(headerRow: string[], component: any): void { - if (this.hasPostPrompt(component)) { - headerRow.splice(headerRow.indexOf('Response'), 0, 'Post Prompt'); - } + private insertBeforeResponseColumn(headerRow: string[], columnName: string): void { + headerRow.splice(headerRow.indexOf('Response'), 0, columnName); } private hasPrePrompt(component: any): boolean { - const prePrompt = component.dynamicPrompt?.prePrompt; - return prePrompt != null && prePrompt !== ''; + return this.hasDynamicPrompt(component) && this.hasValue(component.dynamicPrompt?.prePrompt); } - private hasDynamicPrompt(componentStates: any[]): boolean { - return componentStates.some( - (componentState: any) => componentState.studentData.dynamicPrompt?.prompt != null - ); + private hasDynamicPrompt(component: any): boolean { + return component.dynamicPrompt?.enabled; } private hasPostPrompt(component: any): boolean { - const postPrompt = component.dynamicPrompt?.postPrompt; - return postPrompt != null && postPrompt !== ''; + return this.hasDynamicPrompt(component) && this.hasValue(component.dynamicPrompt?.postPrompt); } - private insertQuestionColumnsIfNecessary(headerRow: string[], componentStates: any[]): void { - const maxQuestions = this.getMaxQuestionBankCount(componentStates); - if (maxQuestions > 0) { - for (let q = 0; q < maxQuestions; q++) { - headerRow.splice(headerRow.indexOf('Response'), 0, `Question ${q + 1}`); - } - } + private hasValue(value: any): boolean { + return value != null && value !== ''; + } + + private isClickToUseEnabled(component: any): boolean { + return component.questionBank?.clickToUseEnabled; } private getMaxQuestionBankCount(componentStates: any[]): number { @@ -218,7 +223,7 @@ export class PeerChatComponentDataExportStrategy extends AbstractDataExportStrat this.projectService.getNodePositionAndTitle(nodeId) ); this.setColumnValue(row, columnNameToNumber, 'Component Type', component.type); - this.setColumnValue(row, columnNameToNumber, 'Component Prompt', component.prompt); + this.setColumnValue(row, columnNameToNumber, 'Prompt', component.prompt); } private setStudentWork( @@ -239,25 +244,53 @@ export class PeerChatComponentDataExportStrategy extends AbstractDataExportStrat 'Client Timestamp', millisecondsToDateTime(componentState.clientSaveTime) ); - this.setColumnValue(row, columnNameToNumber, 'Pre Prompt', component.dynamicPrompt?.prePrompt); - this.setColumnValue( - row, - columnNameToNumber, - 'Dynamic Prompt', - componentState.studentData.dynamicPrompt?.prompt - ); - this.setColumnValue( - row, - columnNameToNumber, - 'Post Prompt', - component.dynamicPrompt?.postPrompt - ); + this.setDynamicPrompts(row, columnNameToNumber, component, componentState); if (componentState.studentData.questionBank != null) { this.setQuestions(row, columnNameToNumber, componentState); } + if (this.isClickToUseEnabled(component)) { + this.setColumnValue( + row, + columnNameToNumber, + 'Question Used', + this.getQuestionText(component, componentState.studentData.questionId) + ); + } this.setColumnValue(row, columnNameToNumber, 'Response', componentState.studentData.response); } + private setDynamicPrompts( + row: any, + columnNameToNumber: any, + component: any, + componentState: any + ): void { + if (this.hasPrePrompt(component)) { + this.setColumnValue( + row, + columnNameToNumber, + 'Pre Prompt', + component.dynamicPrompt?.prePrompt + ); + } + if (this.hasDynamicPrompt(component)) { + this.setColumnValue( + row, + columnNameToNumber, + 'Dynamic Prompt', + componentState.studentData.dynamicPrompt?.prompt + ); + } + if (this.hasPostPrompt(component)) { + this.setColumnValue( + row, + columnNameToNumber, + 'Post Prompt', + component.dynamicPrompt?.postPrompt + ); + } + } + private setQuestions(row: any[], columnNameToNumber: any, componentState: any): void { let questionCounter = 1; for (const questionBank of componentState.studentData.questionBank) { @@ -272,6 +305,17 @@ export class PeerChatComponentDataExportStrategy extends AbstractDataExportStrat } } + private getQuestionText(component: any, questionId: string): string { + for (const rule of component.questionBank.rules) { + for (const question of rule.questions) { + if (question.id === questionId) { + return question.text; + } + } + } + return null; + } + private setColumnValue( row: any[], columnNameToNumber: any, From 3980f936f3f4494f96d185bc39e43b52cf5b004b Mon Sep 17 00:00:00 2001 From: Geoffrey Kwan Date: Fri, 27 Oct 2023 12:12:56 -0400 Subject: [PATCH 14/21] build(Draw Tool): Use modified draw tool (#1495) --- angular.json | 2 +- package-lock.json | 42 +++++++++---------- package.json | 2 +- .../wise5/components/draw/drawService.ts | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/angular.json b/angular.json index bc784ccfabb..cea5388000c 100644 --- a/angular.json +++ b/angular.json @@ -15,7 +15,7 @@ "angular", "fabric", "dom-autoscroller", - "drawing-tool", + "@wise-community/drawing-tool", "jquery", "rxjs/internal/BehaviorSubject", "canvg", diff --git a/package-lock.json b/package-lock.json index 9ab2dfcd312..ae654fd0595 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,7 @@ "@stomp/rx-stomp": "^1.1.4", "@stomp/stompjs": "^5.4.4", "@tinymce/tinymce-angular": "^4.2.4", + "@wise-community/drawing-tool": "^2.3.0-pre.1", "@zxcvbn-ts/core": "^2.2.1", "@zxcvbn-ts/language-en": "^2.1.0", "angular-password-strength-meter": "^6.0.0", @@ -33,7 +34,6 @@ "compute-covariance": "^1.0.1", "core-js": "^3.22.0", "dom-autoscroller": "^2.3.4", - "drawing-tool": "^2.1.2", "eventemitter2": "^5.0.1", "fabric": "3.6.3", "file-saver": "^2.0.5", @@ -6099,6 +6099,26 @@ "@xtuc/long": "4.2.2" } }, + "node_modules/@wise-community/drawing-tool": { + "version": "2.3.0-pre.1", + "resolved": "https://registry.npmjs.org/@wise-community/drawing-tool/-/drawing-tool-2.3.0-pre.1.tgz", + "integrity": "sha512-hnGQX06NoKVvoNZlSAxDzfwbdkWApttvr4Yn4KGagSJCbBi0czQR2DHJ5GZbYXiOtJBYzIs5iaSpirNOg2xe7g==", + "dependencies": { + "eventemitter2": "~0.4.14", + "fabric": "3.6.3", + "hammerjs": "~2.0.4", + "query-string": "^4.3.2", + "uuid": "^8.3.2" + }, + "peerDependencies": { + "jquery": ">= 2.1.3" + } + }, + "node_modules/@wise-community/drawing-tool/node_modules/eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==" + }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -9747,26 +9767,6 @@ "node": ">=8" } }, - "node_modules/drawing-tool": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/drawing-tool/-/drawing-tool-2.2.0.tgz", - "integrity": "sha512-ohvxdZHB899eCKSdAF4k9un9ymMDYeKvV+Sb9HTT8whcb8k7ZTwdKKPh6dNpKNTT3QUWLwEsDlLnd5tpqz85Xw==", - "dependencies": { - "eventemitter2": "~0.4.14", - "fabric": "3.6.3", - "hammerjs": "~2.0.4", - "query-string": "^4.3.2", - "uuid": "^8.3.2" - }, - "peerDependencies": { - "jquery": ">= 2.1.3" - } - }, - "node_modules/drawing-tool/node_modules/eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==" - }, "node_modules/duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", diff --git a/package.json b/package.json index 2287973c6a3..6f6936cad6d 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "@stomp/rx-stomp": "^1.1.4", "@stomp/stompjs": "^5.4.4", "@tinymce/tinymce-angular": "^4.2.4", + "@wise-community/drawing-tool": "^2.3.0-pre.1", "@zxcvbn-ts/core": "^2.2.1", "@zxcvbn-ts/language-en": "^2.1.0", "angular-password-strength-meter": "^6.0.0", @@ -34,7 +35,6 @@ "compute-covariance": "^1.0.1", "core-js": "^3.22.0", "dom-autoscroller": "^2.3.4", - "drawing-tool": "^2.1.2", "eventemitter2": "^5.0.1", "fabric": "3.6.3", "file-saver": "^2.0.5", diff --git a/src/assets/wise5/components/draw/drawService.ts b/src/assets/wise5/components/draw/drawService.ts index 270221be4d6..534e2222063 100644 --- a/src/assets/wise5/components/draw/drawService.ts +++ b/src/assets/wise5/components/draw/drawService.ts @@ -5,7 +5,7 @@ import * as fabric from 'fabric'; window['fabric'] = fabric.fabric; import * as EventEmitter2 from 'eventemitter2'; window['EventEmitter2'] = EventEmitter2; -import DrawingTool from 'drawing-tool/dist/drawing-tool'; +import DrawingTool from '@wise-community/drawing-tool/dist/drawing-tool'; import { ComponentService } from '../componentService'; import { StudentAssetService } from '../../services/studentAssetService'; import { Injectable } from '@angular/core'; From 87367eedbdd92bde30318e0c4f6bc64193d3cb55 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 27 Oct 2023 09:47:05 -0700 Subject: [PATCH 15/21] refactor(NodeService): Clean up getPrevNodeId() for AT/CM modes (#1496) --- src/assets/wise5/services/nodeService.ts | 31 ++++++------------------ 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/src/assets/wise5/services/nodeService.ts b/src/assets/wise5/services/nodeService.ts index 477521006c7..a539f6ec9a4 100644 --- a/src/assets/wise5/services/nodeService.ts +++ b/src/assets/wise5/services/nodeService.ts @@ -88,33 +88,18 @@ export class NodeService { * Get the previous node in the project sequence * @param currentId (optional) */ - getPrevNodeId(currentId?) { + getPrevNodeId(currentId?: string): string { let prevNodeId = null; - let currentNodeId = null; - const mode = this.ConfigService.getMode(); - if (currentId) { - currentNodeId = currentId; - } else { - let currentNode = null; - currentNode = this.DataService.getCurrentNode(); - if (currentNode) { - currentNodeId = currentNode.id; - } - } + const currentNodeId = currentId ?? this.DataService.getCurrentNodeId(); if (currentNodeId) { - if (['classroomMonitor', 'author'].includes(mode)) { - let currentNodeOrder = this.ProjectService.getNodeOrderById(currentNodeId); + if (['author', 'classroomMonitor'].includes(this.ConfigService.getMode())) { + const currentNodeOrder = this.ProjectService.getNodeOrderById(currentNodeId); if (currentNodeOrder) { - let prevNodeOrder = currentNodeOrder - 1; - let prevId = this.ProjectService.getNodeIdByOrder(prevNodeOrder); + const prevId = this.ProjectService.getNodeIdByOrder(currentNodeOrder - 1); if (prevId) { - if (this.ProjectService.isApplicationNode(prevId)) { - // node is a step, so set it as the next node - prevNodeId = prevId; - } else if (this.ProjectService.isGroupNode(prevId)) { - // node is an activity, so get next nodeId - prevNodeId = this.getPrevNodeId(prevId); - } + prevNodeId = this.ProjectService.isApplicationNode(prevId) + ? prevId + : this.getPrevNodeId(prevId); } } } else { From 1a522befbd5405d699a5bb2e476cec633bcfdbda Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 27 Oct 2023 14:54:27 -0700 Subject: [PATCH 16/21] refactor(FAQ): Extract common code to parent (#1487) * fix(Entire Application): Support Angular anchor scrolling * Make GettingStarted component extend FaqComponent to reduce duplication Co-authored-by: Jonathan Lim-Breitbart --- src/app/app.component.scss | 4 + src/app/app.module.ts | 3 +- src/app/help/faq/faq.component.ts | 23 + .../getting-started.component.html | 16 +- .../getting-started.component.spec.ts | 20 +- .../getting-started.component.ts | 9 + .../student-faq/student-faq.component.html | 36 +- .../student-faq/student-faq.component.spec.ts | 20 +- .../faq/student-faq/student-faq.component.ts | 8 + .../teacher-faq/teacher-faq.component.html | 93 +- .../teacher-faq/teacher-faq.component.spec.ts | 20 +- .../faq/teacher-faq/teacher-faq.component.ts | 8 + .../getting-started.component.scss | 8 - .../getting-started.component.ts | 28 - src/app/help/help-routing.module.ts | 6 +- src/app/help/help.module.ts | 9 +- .../student-faq/student-faq.component.scss | 16 - .../help/student-faq/student-faq.component.ts | 32 - .../teacher-faq/teacher-faq.component.scss | 16 - .../help/teacher-faq/teacher-faq.component.ts | 32 - src/messages.xlf | 1350 ++++++++--------- 21 files changed, 840 insertions(+), 917 deletions(-) create mode 100644 src/app/help/faq/faq.component.ts rename src/app/help/{ => faq}/getting-started/getting-started.component.html (89%) rename src/app/help/{ => faq}/getting-started/getting-started.component.spec.ts (70%) create mode 100644 src/app/help/faq/getting-started/getting-started.component.ts rename src/app/help/{ => faq}/student-faq/student-faq.component.html (87%) rename src/app/help/{ => faq}/student-faq/student-faq.component.spec.ts (70%) create mode 100644 src/app/help/faq/student-faq/student-faq.component.ts rename src/app/help/{ => faq}/teacher-faq/teacher-faq.component.html (90%) rename src/app/help/{ => faq}/teacher-faq/teacher-faq.component.spec.ts (70%) create mode 100644 src/app/help/faq/teacher-faq/teacher-faq.component.ts delete mode 100644 src/app/help/getting-started/getting-started.component.scss delete mode 100644 src/app/help/getting-started/getting-started.component.ts delete mode 100644 src/app/help/student-faq/student-faq.component.scss delete mode 100644 src/app/help/student-faq/student-faq.component.ts delete mode 100644 src/app/help/teacher-faq/teacher-faq.component.scss delete mode 100644 src/app/help/teacher-faq/teacher-faq.component.ts diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 1cfe37a3ea5..d188b2229e5 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -11,6 +11,10 @@ app-header { z-index: 2; } +mat-sidenav-container, mat-sidenav-content { + overflow: unset; +} + .to-top { position: fixed; bottom: 20px; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 347fd654226..1f225ddc9fa 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -61,7 +61,8 @@ export function initialize( RecaptchaV3Module, RouterModule.forRoot([], { scrollPositionRestoration: 'enabled', - anchorScrolling: 'enabled' + anchorScrolling: 'enabled', + onSameUrlNavigation: 'reload' }) ], providers: [ diff --git a/src/app/help/faq/faq.component.ts b/src/app/help/faq/faq.component.ts new file mode 100644 index 00000000000..2a22fa0fa4e --- /dev/null +++ b/src/app/help/faq/faq.component.ts @@ -0,0 +1,23 @@ +import { Directive, OnInit } from '@angular/core'; +import { ConfigService } from '../../services/config.service'; +import { filter } from 'rxjs'; + +@Directive() +export abstract class FaqComponent implements OnInit { + protected contextPath: string; + + constructor(private configService: ConfigService) { + this.configService + .getConfig() + .pipe(filter((config) => config != null)) + .subscribe((config) => { + this.contextPath = config.contextPath; + }); + } + + ngOnInit(): void {} + + ngAfterViewInit(): void { + document.getElementsByTagName('app-help')[0]?.scrollIntoView(); + } +} diff --git a/src/app/help/getting-started/getting-started.component.html b/src/app/help/faq/getting-started/getting-started.component.html similarity index 89% rename from src/app/help/getting-started/getting-started.component.html rename to src/app/help/faq/getting-started/getting-started.component.html index 17ecdff5176..02a5eec5979 100644 --- a/src/app/help/getting-started/getting-started.component.html +++ b/src/app/help/faq/getting-started/getting-started.component.html @@ -1,17 +1,17 @@
-

- infoGetting Started +

+ infoGetting Started

-
+

Creating an Account

-

+

All users must create their own account. Teachers must create a teacher account and students must create a student account. Users can create an account by going to the WISE Home Page and clicking on the Register link at the upper right of the screen.

-

Here are instructions on how to create a teacher account.

+

Here are instructions on how to create a teacher account.

  1. Go to the WISE Home Page.
  2. @@ -27,13 +27,13 @@

    Creating an Account

    There may be a number added at the end of your username if someone has the same name as you.
-
+

Using a WISE Unit

-

+

To use a WISE unit with your class, you must first choose a unit to use and then set up a "Run" of that unit.

-

Here are instructions on how to set up a Run.

+

Here are instructions on how to set up a Run.

  1. Sign in to WISE with your teacher account.
  2. Click the "Unit Library" tab.
  3. diff --git a/src/app/help/getting-started/getting-started.component.spec.ts b/src/app/help/faq/getting-started/getting-started.component.spec.ts similarity index 70% rename from src/app/help/getting-started/getting-started.component.spec.ts rename to src/app/help/faq/getting-started/getting-started.component.spec.ts index dc0f0e7e974..a1d74d99b39 100644 --- a/src/app/help/getting-started/getting-started.component.spec.ts +++ b/src/app/help/faq/getting-started/getting-started.component.spec.ts @@ -2,8 +2,8 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { GettingStartedComponent } from './getting-started.component'; import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { ConfigService } from '../../services/config.service'; -import { Config } from '../../domain/config'; +import { ConfigService } from '../../../services/config.service'; +import { Config } from '../../../domain/config'; import { Observable } from 'rxjs'; export class MockConfigService { @@ -24,13 +24,15 @@ describe('GettingStartedComponent', () => { let component: GettingStartedComponent; let fixture: ComponentFixture; - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [GettingStartedComponent], - providers: [{ provide: ConfigService, useClass: MockConfigService }], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [GettingStartedComponent], + providers: [{ provide: ConfigService, useClass: MockConfigService }], + schemas: [NO_ERRORS_SCHEMA] + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(GettingStartedComponent); diff --git a/src/app/help/faq/getting-started/getting-started.component.ts b/src/app/help/faq/getting-started/getting-started.component.ts new file mode 100644 index 00000000000..7c9dff486aa --- /dev/null +++ b/src/app/help/faq/getting-started/getting-started.component.ts @@ -0,0 +1,9 @@ +import { Component, OnInit } from '@angular/core'; +import { ConfigService } from '../../../services/config.service'; +import { FaqComponent } from '../faq.component'; + +@Component({ + selector: 'app-getting-started', + templateUrl: './getting-started.component.html' +}) +export class GettingStartedComponent extends FaqComponent {} diff --git a/src/app/help/student-faq/student-faq.component.html b/src/app/help/faq/student-faq/student-faq.component.html similarity index 87% rename from src/app/help/student-faq/student-faq.component.html rename to src/app/help/faq/student-faq/student-faq.component.html index cec1cb8efe5..a267f8fe598 100644 --- a/src/app/help/student-faq/student-faq.component.html +++ b/src/app/help/faq/student-faq/student-faq.component.html @@ -1,17 +1,19 @@ -
    -

    - faceStudent Frequently Asked Questions +
    +

    + faceStudent Frequently Asked Questions

    -
    -

    Table of Contents

    -

    - General Questions -

    -

    - Technical Questions -

    -
    -

    General Questions

    + +

    Table of Contents

    + + +

    General Questions

    How do I create an account?

    1. Go to the Register page.
    2. @@ -49,14 +51,14 @@

      How do I start working on a project?

    3. Choose your period.
    4. Click "Add".
    5. The run will be added to your list of runs.
    6. -
    7. Click "Launch" to open the project.
    8. +
    9. Click "Launch" to open the project.

    I chose the wrong period, how can I change it?

    • Only your teacher can change your period. Please ask them for assistance.
    -
    -

    Technical Questions

    + +

    Technical Questions

    The WISE web site won't load on my web browser. What do I do?

    • @@ -76,7 +78,7 @@

      What if I have trouble logging in?

    Can I use WISE in another language?

    - Yes! +

    Yes!

    1. Sign into WISE with your student account.
    2. diff --git a/src/app/help/student-faq/student-faq.component.spec.ts b/src/app/help/faq/student-faq/student-faq.component.spec.ts similarity index 70% rename from src/app/help/student-faq/student-faq.component.spec.ts rename to src/app/help/faq/student-faq/student-faq.component.spec.ts index 47c07104675..510f802e99b 100644 --- a/src/app/help/student-faq/student-faq.component.spec.ts +++ b/src/app/help/faq/student-faq/student-faq.component.spec.ts @@ -2,9 +2,9 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { StudentFaqComponent } from './student-faq.component'; import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { ConfigService } from '../../services/config.service'; +import { ConfigService } from '../../../services/config.service'; import { Observable } from 'rxjs'; -import { Config } from '../../domain/config'; +import { Config } from '../../../domain/config'; export class MockConfigService { getConfig(): Observable { @@ -24,13 +24,15 @@ describe('StudentFaqComponent', () => { let component: StudentFaqComponent; let fixture: ComponentFixture; - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [StudentFaqComponent], - providers: [{ provide: ConfigService, useClass: MockConfigService }], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [StudentFaqComponent], + providers: [{ provide: ConfigService, useClass: MockConfigService }], + schemas: [NO_ERRORS_SCHEMA] + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(StudentFaqComponent); diff --git a/src/app/help/faq/student-faq/student-faq.component.ts b/src/app/help/faq/student-faq/student-faq.component.ts new file mode 100644 index 00000000000..de943d33c5c --- /dev/null +++ b/src/app/help/faq/student-faq/student-faq.component.ts @@ -0,0 +1,8 @@ +import { Component } from '@angular/core'; +import { FaqComponent } from '../faq.component'; + +@Component({ + selector: 'app-student-faq', + templateUrl: './student-faq.component.html' +}) +export class StudentFaqComponent extends FaqComponent {} diff --git a/src/app/help/teacher-faq/teacher-faq.component.html b/src/app/help/faq/teacher-faq/teacher-faq.component.html similarity index 90% rename from src/app/help/teacher-faq/teacher-faq.component.html rename to src/app/help/faq/teacher-faq/teacher-faq.component.html index a7f99a7f86a..eaa8fabcf63 100644 --- a/src/app/help/teacher-faq/teacher-faq.component.html +++ b/src/app/help/faq/teacher-faq/teacher-faq.component.html @@ -1,34 +1,31 @@
      -

      - schoolTeacher Frequently Asked Questions +

      + schoolTeacher Frequently Asked Questions

      -
      +

      Table of Contents

      -

      - General Questions -

      -

      - Student Management -

      -

      - Project Management -

      -

      - Assessment of Student Work -

      -

      - Real Time Classroom Monitor -

      -

      - Technical Questions -

      -
      -

      General Questions

      + + +

      General Questions

      How do I create an account?

      1. Go to the Register page.
      2. @@ -53,7 +50,7 @@

        How do I use a unit with my class?

        Choose the number of students per team. Choosing 1-3 will allow students to work together in a team. -
      3. +
      4. Choose the start date. Students will not be able to use the project until this date.
      5. Click "Create Run".
      6. @@ -63,10 +60,10 @@

        How do I use a unit with my class?

        Students will need to use this access code to work on the run you created.
      -
      -

      Student Management

      + +

      Student Management

      Should I register my students for WISE or have them do it themselves?

      -

      +

      WISE makes student registration simple and intuitive -- direct your students to the register page by having them go to the WISE home page and clicking the "Register" link at the upper right. They should be able to register in 10 minutes or less. However, you can also opt to @@ -128,14 +125,14 @@

      How do I change a student team after they've started a project run?

    3. - Warning 1: + Warning 1: If you move Student A into an established team, student A loses all of their current work and inherits the current work of the established team.
    4. - Warning 2: + Warning 2: If you move Student A into a newly created (blank) team, student A will lose all of their work.How do I change the period for a student?

  4. Choose a different period.
  5. Click "Save Changes".
  6. - Warning: + Warning: If you move a student to a different period, they will lose all of their work.
-

+

I do not remember my teacher access code that students need to create their account for my new students.

@@ -172,8 +169,8 @@

  • Find the run in your Teacher Home Page.
  • The Access Code will be displayed below the run title.
  • -
    -

    Project Management

    + +

    Project Management

    When should I set up my project run?

    -
    -

    Assessment of Student Work

    + +

    Assessment of Student Work

    How do I review and grade student work?

    -

    How do I find time to grade all of the student work?

    +

    How do I find time to grade all of the student work?

    -
    -

    Real Time Classroom Monitor

    + +

    Real Time Classroom Monitor

    What is the Real Time Classroom Monitor?

    Does the Real Time Classroom Monitor work on a tablet like the iPad?

    Can I use the Real Time Classroom Monitor to pause student screens?

    -
    -

    Technical Questions

    + +

    Technical Questions

    The WISE web site won't load on my web browser. What do I do?

    Can I use WISE in another language?

    - Yes! +

    Yes!

    1. Sign into WISE with your teacher account.
    2. diff --git a/src/app/help/teacher-faq/teacher-faq.component.spec.ts b/src/app/help/faq/teacher-faq/teacher-faq.component.spec.ts similarity index 70% rename from src/app/help/teacher-faq/teacher-faq.component.spec.ts rename to src/app/help/faq/teacher-faq/teacher-faq.component.spec.ts index c3003da94c2..83dfa30c6c4 100644 --- a/src/app/help/teacher-faq/teacher-faq.component.spec.ts +++ b/src/app/help/faq/teacher-faq/teacher-faq.component.spec.ts @@ -2,9 +2,9 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TeacherFaqComponent } from './teacher-faq.component'; import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { ConfigService } from '../../services/config.service'; +import { ConfigService } from '../../../services/config.service'; import { Observable } from 'rxjs'; -import { Config } from '../../domain/config'; +import { Config } from '../../../domain/config'; export class MockConfigService { getConfig(): Observable { @@ -24,13 +24,15 @@ describe('TeacherFaqComponent', () => { let component: TeacherFaqComponent; let fixture: ComponentFixture; - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [TeacherFaqComponent], - providers: [{ provide: ConfigService, useClass: MockConfigService }], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [TeacherFaqComponent], + providers: [{ provide: ConfigService, useClass: MockConfigService }], + schemas: [NO_ERRORS_SCHEMA] + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(TeacherFaqComponent); diff --git a/src/app/help/faq/teacher-faq/teacher-faq.component.ts b/src/app/help/faq/teacher-faq/teacher-faq.component.ts new file mode 100644 index 00000000000..19ecd9b9ced --- /dev/null +++ b/src/app/help/faq/teacher-faq/teacher-faq.component.ts @@ -0,0 +1,8 @@ +import { Component } from '@angular/core'; +import { FaqComponent } from '../faq.component'; + +@Component({ + selector: 'app-teacher-faq', + templateUrl: './teacher-faq.component.html' +}) +export class TeacherFaqComponent extends FaqComponent {} diff --git a/src/app/help/getting-started/getting-started.component.scss b/src/app/help/getting-started/getting-started.component.scss deleted file mode 100644 index 6e01b342645..00000000000 --- a/src/app/help/getting-started/getting-started.component.scss +++ /dev/null @@ -1,8 +0,0 @@ - -.title-icon { - margin-right: 8px; -} - -.indented-text { - margin-left: 24px; -} diff --git a/src/app/help/getting-started/getting-started.component.ts b/src/app/help/getting-started/getting-started.component.ts deleted file mode 100644 index c2af5ccd982..00000000000 --- a/src/app/help/getting-started/getting-started.component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ConfigService } from '../../services/config.service'; - -@Component({ - selector: 'app-getting-started', - templateUrl: './getting-started.component.html', - styleUrls: ['./getting-started.component.scss'] -}) -export class GettingStartedComponent implements OnInit { - contextPath: string; - - constructor(private configService: ConfigService) { - this.configService.getConfig().subscribe((config) => { - if (config != null) { - this.contextPath = config.contextPath; - } - }); - } - - ngOnInit() {} - - ngAfterViewInit() { - const appHelpElements = document.getElementsByTagName('app-help'); - if (appHelpElements.length > 0) { - appHelpElements[0].scrollIntoView(); - } - } -} diff --git a/src/app/help/help-routing.module.ts b/src/app/help/help-routing.module.ts index 2424f0c9b7c..7ddfc43d57b 100644 --- a/src/app/help/help-routing.module.ts +++ b/src/app/help/help-routing.module.ts @@ -2,9 +2,9 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HelpComponent } from './help.component'; import { HelpHomeComponent } from './help-home/help-home.component'; -import { GettingStartedComponent } from './getting-started/getting-started.component'; -import { TeacherFaqComponent } from './teacher-faq/teacher-faq.component'; -import { StudentFaqComponent } from './student-faq/student-faq.component'; +import { GettingStartedComponent } from './faq/getting-started/getting-started.component'; +import { TeacherFaqComponent } from './faq/teacher-faq/teacher-faq.component'; +import { StudentFaqComponent } from './faq/student-faq/student-faq.component'; const helpRoutes: Routes = [ { diff --git a/src/app/help/help.module.ts b/src/app/help/help.module.ts index 13dfb611982..6c70bf443ce 100644 --- a/src/app/help/help.module.ts +++ b/src/app/help/help.module.ts @@ -3,13 +3,14 @@ import { CommonModule } from '@angular/common'; import { HelpComponent } from './help.component'; import { HelpRoutingModule } from './help-routing.module'; import { SharedModule } from '../modules/shared/shared.module'; -import { GettingStartedComponent } from './getting-started/getting-started.component'; -import { TeacherFaqComponent } from './teacher-faq/teacher-faq.component'; -import { StudentFaqComponent } from './student-faq/student-faq.component'; +import { GettingStartedComponent } from './faq/getting-started/getting-started.component'; +import { TeacherFaqComponent } from './faq/teacher-faq/teacher-faq.component'; +import { StudentFaqComponent } from './faq/student-faq/student-faq.component'; import { HelpHomeComponent } from './help-home/help-home.component'; +import { MatDividerModule } from '@angular/material/divider'; @NgModule({ - imports: [CommonModule, HelpRoutingModule, SharedModule], + imports: [CommonModule, HelpRoutingModule, MatDividerModule, SharedModule], declarations: [ HelpComponent, GettingStartedComponent, diff --git a/src/app/help/student-faq/student-faq.component.scss b/src/app/help/student-faq/student-faq.component.scss deleted file mode 100644 index 4d5559364f4..00000000000 --- a/src/app/help/student-faq/student-faq.component.scss +++ /dev/null @@ -1,16 +0,0 @@ - -.title-icon { - margin-right: 8px; -} - -.link { - cursor: pointer; -} - -.indented-text { - margin-left: 24px; -} - -.warning { - color: red; -} diff --git a/src/app/help/student-faq/student-faq.component.ts b/src/app/help/student-faq/student-faq.component.ts deleted file mode 100644 index ef648921a4a..00000000000 --- a/src/app/help/student-faq/student-faq.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ConfigService } from '../../services/config.service'; - -@Component({ - selector: 'app-student-faq', - templateUrl: './student-faq.component.html', - styleUrls: ['./student-faq.component.scss'] -}) -export class StudentFaqComponent implements OnInit { - contextPath: string; - - constructor(private configService: ConfigService) { - this.configService.getConfig().subscribe((config) => { - if (config != null) { - this.contextPath = config.contextPath; - } - }); - } - - ngOnInit() {} - - ngAfterViewInit() { - const appHelpElements = document.getElementsByTagName('app-help'); - if (appHelpElements.length > 0) { - appHelpElements[0].scrollIntoView(); - } - } - - scrollTo(id) { - document.getElementById(id).scrollIntoView(); - } -} diff --git a/src/app/help/teacher-faq/teacher-faq.component.scss b/src/app/help/teacher-faq/teacher-faq.component.scss deleted file mode 100644 index 4d5559364f4..00000000000 --- a/src/app/help/teacher-faq/teacher-faq.component.scss +++ /dev/null @@ -1,16 +0,0 @@ - -.title-icon { - margin-right: 8px; -} - -.link { - cursor: pointer; -} - -.indented-text { - margin-left: 24px; -} - -.warning { - color: red; -} diff --git a/src/app/help/teacher-faq/teacher-faq.component.ts b/src/app/help/teacher-faq/teacher-faq.component.ts deleted file mode 100644 index 2d751768007..00000000000 --- a/src/app/help/teacher-faq/teacher-faq.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ConfigService } from '../../services/config.service'; - -@Component({ - selector: 'app-teacher-faq', - templateUrl: './teacher-faq.component.html', - styleUrls: ['./teacher-faq.component.scss'] -}) -export class TeacherFaqComponent implements OnInit { - contextPath: string; - - constructor(private configService: ConfigService) { - this.configService.getConfig().subscribe((config) => { - if (config != null) { - this.contextPath = config.contextPath; - } - }); - } - - ngOnInit() {} - - ngAfterViewInit() { - const appHelpElements = document.getElementsByTagName('app-help'); - if (appHelpElements.length > 0) { - appHelpElements[0].scrollIntoView(); - } - } - - scrollTo(id) { - document.getElementById(id).scrollIntoView(); - } -} diff --git a/src/messages.xlf b/src/messages.xlf index c0910795c5a..33af4a6d38b 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -3354,536 +3354,254 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.1 - - Getting Started + + Student Frequently Asked Questions - src/app/help/getting-started/getting-started.component.html + src/app/help/faq/student-faq/student-faq.component.html 3 - - src/app/help/help-home/help-home.component.html - 18 - - - src/app/help/student-faq/student-faq.component.html - 130 - - - src/app/help/teacher-faq/teacher-faq.component.html - 410 - - - Creating an Account + + Table of Contents - src/app/help/getting-started/getting-started.component.html + src/app/help/faq/student-faq/student-faq.component.html 6 - - - All users must create their own account. Teachers must create a teacher account and students must create a student account. Users can create an account by going to the WISE Home Page and clicking on the Register link at the upper right of the screen. - - src/app/help/getting-started/getting-started.component.html - 7,13 - - - - Here are instructions on how to create a teacher account. - - src/app/help/getting-started/getting-started.component.html - 14 - - - - Go to the WISE Home Page. - - src/app/help/getting-started/getting-started.component.html - 16 - - - - Click the Register link at the upper right of the screen. - - src/app/help/getting-started/getting-started.component.html - 17,20 - - - - Click on Teacher. - - src/app/help/getting-started/getting-started.component.html - 21 - - - - Choose to sign up with your email or with your Google Account. - - src/app/help/getting-started/getting-started.component.html - 22 - - - src/app/help/student-faq/student-faq.component.html - 19 - - - src/app/help/teacher-faq/teacher-faq.component.html - 36 - - - - Fill out the form and submit it. - - src/app/help/getting-started/getting-started.component.html - 23 - - - src/app/help/student-faq/student-faq.component.html - 20 - - - src/app/help/teacher-faq/teacher-faq.component.html - 37 - - - - If you created an account using your email, you will be given a username that you will need to remember. Your username will be your first name and your last name with no space inbetween. There may be a number added at the end of your username if someone has the same name as you. - src/app/help/getting-started/getting-started.component.html - 24,28 - - - src/app/help/student-faq/student-faq.component.html - 21,25 - - - src/app/help/teacher-faq/teacher-faq.component.html - 38,42 - - - - Using a WISE Unit - - src/app/help/getting-started/getting-started.component.html - 31 - - - - To use a WISE unit with your class, you must first choose a unit to use and then set up a "Run" of that unit. - - src/app/help/getting-started/getting-started.component.html - 32,35 - - - - Here are instructions on how to set up a Run. - - src/app/help/getting-started/getting-started.component.html - 36 - - - - Sign in to WISE with your teacher account. - - src/app/help/getting-started/getting-started.component.html - 38 - - - src/app/help/teacher-faq/teacher-faq.component.html - 46 - - - - Click the "Unit Library" tab. - - src/app/help/getting-started/getting-started.component.html - 39 - - - src/app/help/teacher-faq/teacher-faq.component.html - 47 - - - src/app/help/teacher-faq/teacher-faq.component.html - 204 - - - - Find a project that you would like to use with your class. - - src/app/help/getting-started/getting-started.component.html - 40 - - - src/app/help/teacher-faq/teacher-faq.component.html - 48 - - - - Click on the project to open the information for the project. - - src/app/help/getting-started/getting-started.component.html - 41 - - - src/app/help/teacher-faq/teacher-faq.component.html - 49 - - - - Click the "Use With Class" button. - - src/app/help/getting-started/getting-started.component.html - 42 - - - src/app/help/teacher-faq/teacher-faq.component.html - 50 - - - - Choose the periods you will use the project in. - - src/app/help/getting-started/getting-started.component.html - 43 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 6 - src/app/help/teacher-faq/teacher-faq.component.html - 51 + src/app/privacy/privacy.component.html + 4 - - Choose the number of students per team. Choosing 1-3 will allow students to work together in a team. + + General Questions - src/app/help/getting-started/getting-started.component.html - 44,47 + src/app/help/faq/student-faq/student-faq.component.html + 9 - src/app/help/teacher-faq/teacher-faq.component.html - 52,55 + src/app/help/faq/student-faq/student-faq.component.html + 16 - - - Choose the start date. Students will not be able to use the project until this date. - src/app/help/getting-started/getting-started.component.html - 48,50 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 9 - src/app/help/teacher-faq/teacher-faq.component.html - 56,58 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 28 - - Click "Create Run". - - src/app/help/getting-started/getting-started.component.html - 51 - + + Technical Questions - src/app/help/teacher-faq/teacher-faq.component.html - 59 + src/app/help/faq/student-faq/student-faq.component.html + 12 - - - The run will be created and added to your Teacher Home. - src/app/help/getting-started/getting-started.component.html - 52 + src/app/help/faq/student-faq/student-faq.component.html + 61 - src/app/help/teacher-faq/teacher-faq.component.html - 60 - - - - Copy the "Access Code" for the new run and write it down somewhere like on the white board. Students will need to use this access code to work on the run you created. - - src/app/help/getting-started/getting-started.component.html - 53,56 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 24 - src/app/help/teacher-faq/teacher-faq.component.html - 61,64 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 328 - - Teacher FAQ + + How do I create an account? - src/app/help/getting-started/getting-started.component.html - 76 + src/app/help/faq/student-faq/student-faq.component.html + 17 - src/app/help/help-home/help-home.component.html + src/app/help/faq/teacher-faq/teacher-faq.component.html 29 - - src/app/help/student-faq/student-faq.component.html - 141 - - - Questions from teachers. + + Go to the Register page. - src/app/help/getting-started/getting-started.component.html - 78 + src/app/help/faq/student-faq/student-faq.component.html + 19 - src/app/help/help-home/help-home.component.html + src/app/help/faq/teacher-faq/teacher-faq.component.html 31 - - src/app/help/student-faq/student-faq.component.html - 143 - - - - Student FAQ - - src/app/help/getting-started/getting-started.component.html - 87 - - - src/app/help/help-home/help-home.component.html - 40 - - - src/app/help/teacher-faq/teacher-faq.component.html - 421 - - - Questions from students. - - src/app/help/getting-started/getting-started.component.html - 89 - - - src/app/help/help-home/help-home.component.html - 42 - - - src/app/help/teacher-faq/teacher-faq.component.html - 423 - - - - Information for new users. + + Click on Student. - src/app/help/help-home/help-home.component.html + src/app/help/faq/student-faq/student-faq.component.html 20 - - src/app/help/student-faq/student-faq.component.html - 132 - - - src/app/help/teacher-faq/teacher-faq.component.html - 412 - - - Student Frequently Asked Questions - - src/app/help/student-faq/student-faq.component.html - 3 - - - - Table of Contents - - src/app/help/student-faq/student-faq.component.html - 6 - - - src/app/help/teacher-faq/teacher-faq.component.html - 7 - - - src/app/privacy/privacy.component.html - 4 - - - - General Questions - - src/app/help/student-faq/student-faq.component.html - 8 - + + Choose to sign up with your email or with your Google Account. - src/app/help/student-faq/student-faq.component.html - 14 + src/app/help/faq/student-faq/student-faq.component.html + 21 - src/app/help/teacher-faq/teacher-faq.component.html - 9 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 33 - src/app/help/teacher-faq/teacher-faq.component.html - 31 + src/app/help/getting-started/getting-started.component.html + 22 - - Technical Questions - - src/app/help/student-faq/student-faq.component.html - 11 - - - src/app/help/student-faq/student-faq.component.html - 59 - - - src/app/help/teacher-faq/teacher-faq.component.html - 28 - + + Fill out the form and submit it. - src/app/help/teacher-faq/teacher-faq.component.html - 331 + src/app/help/faq/student-faq/student-faq.component.html + 22 - - - How do I create an account? - src/app/help/student-faq/student-faq.component.html - 15 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 34 - src/app/help/teacher-faq/teacher-faq.component.html - 32 + src/app/help/getting-started/getting-started.component.html + 23 - - Go to the Register page. + + If you created an account using your email, you will be given a username that you will need to remember. Your username will be your first name and your last name with no space inbetween. There may be a number added at the end of your username if someone has the same name as you. - src/app/help/student-faq/student-faq.component.html - 17 + src/app/help/faq/student-faq/student-faq.component.html + 23,27 - src/app/help/teacher-faq/teacher-faq.component.html - 34 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 35,39 - - - Click on Student. - src/app/help/student-faq/student-faq.component.html - 18 + src/app/help/getting-started/getting-started.component.html + 24,28 I forgot my username, how can I find it? - src/app/help/student-faq/student-faq.component.html - 27 + src/app/help/faq/student-faq/student-faq.component.html + 29 Go to the forgot username page and follow the instructions to retrieve your username. - src/app/help/student-faq/student-faq.component.html - 29,31 + src/app/help/faq/student-faq/student-faq.component.html + 31,33 I forgot my password, how can I change it? - src/app/help/student-faq/student-faq.component.html - 33 + src/app/help/faq/student-faq/student-faq.component.html + 35 Go to the forgot password page and follow the instructions to reset your password. - src/app/help/student-faq/student-faq.component.html - 35 + src/app/help/faq/student-faq/student-faq.component.html + 37 How do I start working on a project? - src/app/help/student-faq/student-faq.component.html - 37 + src/app/help/faq/student-faq/student-faq.component.html + 39 In order to start working on a project you must obtain an Access Code from your teacher. Once you have an Access Code, follow the directions below. - src/app/help/student-faq/student-faq.component.html - 38,41 + src/app/help/faq/student-faq/student-faq.component.html + 40,43 Log into WISE with your student account. - src/app/help/student-faq/student-faq.component.html - 43 + src/app/help/faq/student-faq/student-faq.component.html + 45 Click on the "Add Unit" button at the top right of the Student Home Page. - src/app/help/student-faq/student-faq.component.html - 44,47 + src/app/help/faq/student-faq/student-faq.component.html + 46,49 Enter the Access Code from your teacher. - src/app/help/student-faq/student-faq.component.html - 48 + src/app/help/faq/student-faq/student-faq.component.html + 50 Choose your period. - src/app/help/student-faq/student-faq.component.html - 49 + src/app/help/faq/student-faq/student-faq.component.html + 51 Click "Add". - src/app/help/student-faq/student-faq.component.html - 50 + src/app/help/faq/student-faq/student-faq.component.html + 52 The run will be added to your list of runs. - src/app/help/student-faq/student-faq.component.html - 51 + src/app/help/faq/student-faq/student-faq.component.html + 53 Click "Launch" to open the project. - src/app/help/student-faq/student-faq.component.html - 52 + src/app/help/faq/student-faq/student-faq.component.html + 54 I chose the wrong period, how can I change it? - src/app/help/student-faq/student-faq.component.html - 54 + src/app/help/faq/student-faq/student-faq.component.html + 56 Only your teacher can change your period. Please ask them for assistance. - src/app/help/student-faq/student-faq.component.html - 56 + src/app/help/faq/student-faq/student-faq.component.html + 58 The WISE web site won't load on my web browser. What do I do? - src/app/help/student-faq/student-faq.component.html - 60 + src/app/help/faq/student-faq/student-faq.component.html + 62 - src/app/help/teacher-faq/teacher-faq.component.html - 332 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 329 @@ -3891,521 +3609,699 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.clearing your browser cache and then reloading the WISE web site. - src/app/help/student-faq/student-faq.component.html - 62,68 + src/app/help/faq/student-faq/student-faq.component.html + 64,70 - src/app/help/teacher-faq/teacher-faq.component.html - 334,340 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 331,337 You can try using a different web browser. We recommend using Chrome or Firefox. - src/app/help/student-faq/student-faq.component.html - 69 + src/app/help/faq/student-faq/student-faq.component.html + 71 - src/app/help/teacher-faq/teacher-faq.component.html - 341 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 338 What if I have trouble logging in? - src/app/help/student-faq/student-faq.component.html - 71 + src/app/help/faq/student-faq/student-faq.component.html + 73 - src/app/help/teacher-faq/teacher-faq.component.html - 351 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 348 If you do not remember your username or password click the Lost Username or Password link and follow the instructions. - src/app/help/student-faq/student-faq.component.html - 73,76 + src/app/help/faq/student-faq/student-faq.component.html + 75,78 - src/app/help/teacher-faq/teacher-faq.component.html - 353,356 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 350,353 Can I use WISE in another language? - src/app/help/student-faq/student-faq.component.html - 78 - - - src/app/help/teacher-faq/teacher-faq.component.html - 358 - - - - Yes! - - src/app/help/student-faq/student-faq.component.html - 79 + src/app/help/faq/student-faq/student-faq.component.html + 80 - src/app/help/teacher-faq/teacher-faq.component.html - 359 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 355 Sign into WISE with your student account. - src/app/help/student-faq/student-faq.component.html - 81 + src/app/help/faq/student-faq/student-faq.component.html + 83 Click on your account icon at the top right of the page. This should open a drop down with options. - src/app/help/student-faq/student-faq.component.html - 82,85 + src/app/help/faq/student-faq/student-faq.component.html + 84,87 - src/app/help/teacher-faq/teacher-faq.component.html - 362,365 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 359,362 Click the "Edit Profile" option. - src/app/help/student-faq/student-faq.component.html - 86,89 + src/app/help/faq/student-faq/student-faq.component.html + 88,91 - src/app/help/teacher-faq/teacher-faq.component.html - 366,369 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 363,366 Near the bottom there will be a "Language" setting. - src/app/help/student-faq/student-faq.component.html - 90 + src/app/help/faq/student-faq/student-faq.component.html + 92 - src/app/help/teacher-faq/teacher-faq.component.html - 370 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 367 Change the language to the language of your choice. - src/app/help/student-faq/student-faq.component.html - 91 + src/app/help/faq/student-faq/student-faq.component.html + 93 - src/app/help/teacher-faq/teacher-faq.component.html - 371 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 368 Note 1: If your language is not listed as an option, or you'd like to help us improve the translation, please contact us and we'll help you get started! - src/app/help/student-faq/student-faq.component.html - 92,95 + src/app/help/faq/student-faq/student-faq.component.html + 94,97 - src/app/help/teacher-faq/teacher-faq.component.html - 372,375 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 369,372 Note 2: Changing the language will change the language of the website but will not change the language of the projects. Projects must be independently translated which means that if you want to use a project in another language, you must translate it yourself or find a version of the project that has been translated by someone else. - src/app/help/student-faq/student-faq.component.html - 96,101 + src/app/help/faq/student-faq/student-faq.component.html + 98,103 - src/app/help/teacher-faq/teacher-faq.component.html - 376,381 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 373,378 Who do I contact when I have a problem I can't solve? - src/app/help/student-faq/student-faq.component.html - 103 + src/app/help/faq/student-faq/student-faq.component.html + 105 - src/app/help/teacher-faq/teacher-faq.component.html - 383 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 380 The Contact WISE form will send an email to the WISE technology group. You can find a link to the form at the bottom of the home page. Be sure to include as much information as you can about the problem. We will respond as quickly as we can. - src/app/help/student-faq/student-faq.component.html - 105,110 + src/app/help/faq/student-faq/student-faq.component.html + 107,112 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 382,387 + + + + Getting Started + + src/app/help/faq/student-faq/student-faq.component.html + 132 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 407 + + + src/app/help/getting-started/getting-started.component.html + 3 + + + src/app/help/help-home/help-home.component.html + 18 + + + + Information for new users. + + src/app/help/faq/student-faq/student-faq.component.html + 134 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 409 + + + src/app/help/help-home/help-home.component.html + 20 + + + + Teacher FAQ + + src/app/help/faq/student-faq/student-faq.component.html + 143 + + + src/app/help/getting-started/getting-started.component.html + 76 + + + src/app/help/help-home/help-home.component.html + 29 + + + + Questions from teachers. + + src/app/help/faq/student-faq/student-faq.component.html + 145 + + + src/app/help/getting-started/getting-started.component.html + 78 - src/app/help/teacher-faq/teacher-faq.component.html - 385,390 + src/app/help/help-home/help-home.component.html + 31 Teacher Frequently Asked Questions - src/app/help/teacher-faq/teacher-faq.component.html - 4 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 3 Student Management - src/app/help/teacher-faq/teacher-faq.component.html + src/app/help/faq/teacher-faq/teacher-faq.component.html 12 - src/app/help/teacher-faq/teacher-faq.component.html - 67 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 64 Project Management - src/app/help/teacher-faq/teacher-faq.component.html + src/app/help/faq/teacher-faq/teacher-faq.component.html 15 - src/app/help/teacher-faq/teacher-faq.component.html - 176 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 173 Assessment of Student Work - src/app/help/teacher-faq/teacher-faq.component.html - 19 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 18 - src/app/help/teacher-faq/teacher-faq.component.html - 253 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 250 Real Time Classroom Monitor - src/app/help/teacher-faq/teacher-faq.component.html - 24 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 21 - src/app/help/teacher-faq/teacher-faq.component.html - 309 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 306 Click on "Teacher". - src/app/help/teacher-faq/teacher-faq.component.html - 35 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 32 + + + + How do I use a unit with my class? + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 41 + + + + Sign in to WISE with your teacher account. + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 43 + + + src/app/help/getting-started/getting-started.component.html + 38 + + + + Click the "Unit Library" tab. + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 44 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 201 + + + src/app/help/getting-started/getting-started.component.html + 39 + + + + Find a project that you would like to use with your class. + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 45 + + + src/app/help/getting-started/getting-started.component.html + 40 + + + + Click on the project to open the information for the project. + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 46 + + + src/app/help/getting-started/getting-started.component.html + 41 + + + + Click the "Use With Class" button. + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 47 + + + src/app/help/getting-started/getting-started.component.html + 42 + + + + Choose the periods you will use the project in. + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 48 + + + src/app/help/getting-started/getting-started.component.html + 43 + + + + Choose the number of students per team. Choosing 1-3 will allow students to work together in a team. + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 49,52 + + + src/app/help/getting-started/getting-started.component.html + 44,47 + + + + Choose the start date. Students will not be able to use the project until this date. + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 53,55 + + + src/app/help/getting-started/getting-started.component.html + 48,50 + + + + Click "Create Run". + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 56 + + + src/app/help/getting-started/getting-started.component.html + 51 + + + + The run will be created and added to your Teacher Home. + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 57 + + + src/app/help/getting-started/getting-started.component.html + 52 + + + + Copy the "Access Code" for the new run and write it down somewhere like on the white board. Students will need to use this access code to work on the run you created. + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 58,61 - - - How do I use a unit with my class? - src/app/help/teacher-faq/teacher-faq.component.html - 44 + src/app/help/getting-started/getting-started.component.html + 53,56 Should I register my students for WISE or have them do it themselves? - src/app/help/teacher-faq/teacher-faq.component.html - 68 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 65 WISE makes student registration simple and intuitive -- direct your students to the register page by having them go to the WISE home page and clicking the "Register" link at the upper right. They should be able to register in 10 minutes or less. However, you can also opt to pre-register all of your students and provide them with a copy of their username/password on their first day in the project run. - src/app/help/teacher-faq/teacher-faq.component.html - 69,75 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 66,72 Once a student has created a WISE account they should never need to create another one. - src/app/help/teacher-faq/teacher-faq.component.html - 77,79 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 74,76 Some teachers that pre-register prefer to give all students the same initial password, to decrease problems with students signing in. This is ok, but for security purposes, we advise that you have the students change their passwords once they log in. - src/app/help/teacher-faq/teacher-faq.component.html - 80,84 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 77,81 A student has forgotten his/her username or password. What should I do? - src/app/help/teacher-faq/teacher-faq.component.html - 86 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 83 First, we recommend always having students WRITE DOWN their username/password when they first register. - src/app/help/teacher-faq/teacher-faq.component.html - 88,91 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 85,88 Second, encourage the students to solve the problem themselves. Tell them to go to the WISE home page, click the Lost username/password link, and click the Student button. If the student can answer their security question (created at registration) they can change their password. - src/app/help/teacher-faq/teacher-faq.component.html - 92,96 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 89,93 Third, if the student can't solve the problem directly, you can change their password for them using the instructions below. - src/app/help/teacher-faq/teacher-faq.component.html - 97,100 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 94,97 How do I change a student's password? - src/app/help/teacher-faq/teacher-faq.component.html - 102 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 99 Sign into WISE with your teacher account. - src/app/help/teacher-faq/teacher-faq.component.html - 104 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 101 - src/app/help/teacher-faq/teacher-faq.component.html - 117 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 114 - src/app/help/teacher-faq/teacher-faq.component.html - 147 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 144 - src/app/help/teacher-faq/teacher-faq.component.html - 171 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 168 - src/app/help/teacher-faq/teacher-faq.component.html - 203 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 200 - src/app/help/teacher-faq/teacher-faq.component.html - 225 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 222 - src/app/help/teacher-faq/teacher-faq.component.html - 234 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 231 - src/app/help/teacher-faq/teacher-faq.component.html - 256 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 253 - src/app/help/teacher-faq/teacher-faq.component.html - 361 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 358 Find the run in your Teacher Home Page. - src/app/help/teacher-faq/teacher-faq.component.html - 105 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 102 - src/app/help/teacher-faq/teacher-faq.component.html - 118 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 115 - src/app/help/teacher-faq/teacher-faq.component.html - 148 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 145 - src/app/help/teacher-faq/teacher-faq.component.html - 172 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 169 - src/app/help/teacher-faq/teacher-faq.component.html - 226 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 223 - src/app/help/teacher-faq/teacher-faq.component.html - 235 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 232 - src/app/help/teacher-faq/teacher-faq.component.html - 257 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 254 Click the "Teacher Tools" button on the run. - src/app/help/teacher-faq/teacher-faq.component.html - 106 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 103 - src/app/help/teacher-faq/teacher-faq.component.html - 119 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 116 - src/app/help/teacher-faq/teacher-faq.component.html - 149 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 146 - src/app/help/teacher-faq/teacher-faq.component.html - 258 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 255 Click on the "Manage Students" icon on the left side bar. - src/app/help/teacher-faq/teacher-faq.component.html - 107 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 104 - src/app/help/teacher-faq/teacher-faq.component.html - 120 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 117 - src/app/help/teacher-faq/teacher-faq.component.html - 150 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 147 Find the period the student is in. - src/app/help/teacher-faq/teacher-faq.component.html - 108 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 105 - src/app/help/teacher-faq/teacher-faq.component.html - 121 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 118 - src/app/help/teacher-faq/teacher-faq.component.html - 151 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 148 Find the student and click "Change Password". - src/app/help/teacher-faq/teacher-faq.component.html - 109 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 106 Alternatively, you can change the password for ALL students in the current period (the new password will be applied to all the students in the period). - src/app/help/teacher-faq/teacher-faq.component.html - 110,113 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 107,110 How do I change a student team after they've started a project run? - src/app/help/teacher-faq/teacher-faq.component.html - 115 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 112 Drag-and-drop student names to move them from one team to another. Make sure to save your changes before leaving this window. - src/app/help/teacher-faq/teacher-faq.component.html - 122,125 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 119,122 If you want to move students into a brand new team, click New Team, then drag 1 or more students into the new team. Save your changes. - src/app/help/teacher-faq/teacher-faq.component.html - 126,129 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 123,126 Warning 1 - src/app/help/teacher-faq/teacher-faq.component.html - 131 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 128 If you move Student A into an established team, student A loses all of their current work and inherits the current work of the established team. - src/app/help/teacher-faq/teacher-faq.component.html - 133,134 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 130,131 Warning 2 - src/app/help/teacher-faq/teacher-faq.component.html - 138 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 135 If you move Student A into a newly created (blank) team, student A will lose all of their work. - src/app/help/teacher-faq/teacher-faq.component.html - 140,141 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 137,138 How do I change the period for a student? - src/app/help/teacher-faq/teacher-faq.component.html - 145 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 142 Find the student. - src/app/help/teacher-faq/teacher-faq.component.html - 152 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 149 Click the "Period" link. - src/app/help/teacher-faq/teacher-faq.component.html - 153 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 150 A popup will show up that will allow you to choose a different period for the student. - src/app/help/teacher-faq/teacher-faq.component.html - 154,156 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 151,153 Choose a different period. - src/app/help/teacher-faq/teacher-faq.component.html - 157 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 154 Click "Save Changes". - src/app/help/teacher-faq/teacher-faq.component.html - 158 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 155 Warning - src/app/help/teacher-faq/teacher-faq.component.html - 160 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 157 src/app/modules/shared/unlink-google-account-confirm/unlink-google-account-confirm.component.html @@ -4431,359 +4327,459 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. If you move a student to a different period, they will lose all of their work. - src/app/help/teacher-faq/teacher-faq.component.html - 162 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 159 I do not remember my teacher access code that students need to create their account for my new students. - src/app/help/teacher-faq/teacher-faq.component.html - 166,169 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 163,166 The Access Code will be displayed below the run title. - src/app/help/teacher-faq/teacher-faq.component.html - 173 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 170 When should I set up my project run? - src/app/help/teacher-faq/teacher-faq.component.html - 177 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 174 You need to set up your project run anytime before the students can start working on the project. They will need the Access Code for the run in order to start working. - src/app/help/teacher-faq/teacher-faq.component.html - 179,182 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 176,179 How long does it take to run a project? - src/app/help/teacher-faq/teacher-faq.component.html - 184 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 181 Project durations vary from about 3 days to 10 days. Some projects may display an estimation of the number of hours it will take for students to complete the project. - src/app/help/teacher-faq/teacher-faq.component.html - 186,189 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 183,186 Can I shorten a project run to 1 or 2 days? - src/app/help/teacher-faq/teacher-faq.component.html - 191 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 188 It is not recommended to shorten a project. Each project has been carefully designed to lead the student through an inquiry process and cutting it short will result in a less satisfactory educational student experience. Nevertheless, if you are under a time constraint and knowledgeable of the project topic, you could customize the project and shorten it to your specific needs. - src/app/help/teacher-faq/teacher-faq.component.html - 193,199 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 190,196 Where do I find out about lesson plans and standards for WISE projects? - src/app/help/teacher-faq/teacher-faq.component.html - 201 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 198 Find a project you would like to learn about. - src/app/help/teacher-faq/teacher-faq.component.html - 205 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 202 Click on the project. - src/app/help/teacher-faq/teacher-faq.component.html - 206 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 203 This will display a popup that displays information about the project. - src/app/help/teacher-faq/teacher-faq.component.html - 207 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 204 Note: Some projects may not have much information because it is dependent on the author to provide the lesson plan and standards. - src/app/help/teacher-faq/teacher-faq.component.html - 208,211 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 205,208 How do I fit a WISE project into my curriculum? - src/app/help/teacher-faq/teacher-faq.component.html - 213 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 210 In general students will benefit from some pre-teaching of the topic covered in the project. It is really up to the teacher to decide where it best fits to support student learning. Many teachers use a WISE project as a capstone activity while others integrate it into their curriculum at a midpoint. Some teachers elect to use WISE projects an introductory activity for a unit, or as a summation activity for a unit. - src/app/help/teacher-faq/teacher-faq.component.html - 215,221 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 212,218 How do I add a period after creating a run? - src/app/help/teacher-faq/teacher-faq.component.html - 223 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 220 On the run, click the three vertical dots to view the run options. - src/app/help/teacher-faq/teacher-faq.component.html - 227 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 224 - src/app/help/teacher-faq/teacher-faq.component.html - 236 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 233 Click "Edit Settings". - src/app/help/teacher-faq/teacher-faq.component.html - 228 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 225 - src/app/help/teacher-faq/teacher-faq.component.html - 237 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 234 Enter a period name in the "Add New Period" field. - src/app/help/teacher-faq/teacher-faq.component.html - 229 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 226 Click "Add Period". - src/app/help/teacher-faq/teacher-faq.component.html - 230 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 227 How do I delete a period after creating a run? - src/app/help/teacher-faq/teacher-faq.component.html - 232 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 229 Find the period you want to delete and click the "Delete" button next to it. - src/app/help/teacher-faq/teacher-faq.component.html - 238 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 235 Note: You are not allowed to delete a period that has students in it. - src/app/help/teacher-faq/teacher-faq.component.html - 239 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 236 What if I run out of computer lab time but some of my students are not finished with the project? - src/app/help/teacher-faq/teacher-faq.component.html - 241,244 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 238,241 WISE is a web-based learning environments, so students can sign in from a computer at school or at home. This means that students can complete the project from any home or community based computer, per the teacher's discretion. - src/app/help/teacher-faq/teacher-faq.component.html - 246,250 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 243,247 How do I review and grade student work? - src/app/help/teacher-faq/teacher-faq.component.html - 254 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 251 Here you will be able to look at your students' work. - src/app/help/teacher-faq/teacher-faq.component.html - 259 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 256 On the left sidebar you can choose to look at the work by step by clicking "Grade By Step" or you can choose to look at the work by team by clicking "Grade By Team". - src/app/help/teacher-faq/teacher-faq.component.html - 260,263 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 257,260 Next to each student's work, you will be able to give them a score and comment. - src/app/help/teacher-faq/teacher-faq.component.html - 264 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 261 How do students see my comments and scores for their work? - src/app/help/teacher-faq/teacher-faq.component.html - 266 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 263 The student must sign into WISE with their student account. - src/app/help/teacher-faq/teacher-faq.component.html - 268 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 265 Open the project. - src/app/help/teacher-faq/teacher-faq.component.html - 269 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 266 Go to the step that the teacher graded. - src/app/help/teacher-faq/teacher-faq.component.html - 270 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 267 The comment and score will be displayed under the piece of work that was graded. - src/app/help/teacher-faq/teacher-faq.component.html - 271 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 268 What should I look for in my student's answers? - src/app/help/teacher-faq/teacher-faq.component.html - 273 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 270 The following link will give you a sample rubric for grading a step in the Mitosis and Cell Processes project. The rubric is based on our TELS Center research on how students integrate their knowledge of complex science concepts. We hope that it can give you a start in developing your own rubrics for the notes and steps you plan to grade. - src/app/help/teacher-faq/teacher-faq.component.html - 275,280 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 272,277 Sample rubric for assessing student work - src/app/help/teacher-faq/teacher-faq.component.html - 286 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 283 How can I encourage my students to review the graded notes and comments I have made? - src/app/help/teacher-faq/teacher-faq.component.html - 290 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 287 Many teachers find it advantageous to grade the first step or two at the end of the first day of the project run. At the beginning of class the next day they share with the whole class some sample responses and have the class critique the work. - src/app/help/teacher-faq/teacher-faq.component.html - 292,296 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 289,293 How do I find time to grade all of the student work? - src/app/help/teacher-faq/teacher-faq.component.html - 298 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 295 We recommend that you go through the project and select a few steps that you think best demonstrate the students' understanding of the complex concepts covered in the module and grade those steps. Then tell your students they must complete all questions but should concentrate their efforts on the key steps. We recognize that critically grading each step is very time consuming and unpractical. - src/app/help/teacher-faq/teacher-faq.component.html - 300,306 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 297,303 What is the Real Time Classroom Monitor? - src/app/help/teacher-faq/teacher-faq.component.html - 310 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 307 The Real Time Classroom Monitor allows teachers to view student progress in real time. Teachers will be able to see what step a student is on, how much time the student has spent on that step, and how much of the project the student has completed. All of this information will be updated immediately in real time as students work on the project. - src/app/help/teacher-faq/teacher-faq.component.html - 312,317 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 309,314 Does the Real Time Classroom Monitor work on a tablet like the iPad? - src/app/help/teacher-faq/teacher-faq.component.html - 319 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 316 Yes it does. - src/app/help/teacher-faq/teacher-faq.component.html - 321 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 318 Can I use the Real Time Classroom Monitor to pause student screens? - src/app/help/teacher-faq/teacher-faq.component.html - 323 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 320 Yes you can! This can be useful if you need to grab their attention in order to have a class discussion or to make an announcement. - src/app/help/teacher-faq/teacher-faq.component.html - 325,328 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 322,325 How many computers do I need to run WISE? - src/app/help/teacher-faq/teacher-faq.component.html - 343 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 340 We strongly recommend one computer for every two students. Research shows that students benefit from working together as a team of two. - src/app/help/teacher-faq/teacher-faq.component.html - 345,348 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 342,345 + + + + Yes! + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 356 + + + + Student FAQ + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 418 + + + src/app/help/getting-started/getting-started.component.html + 87 + + + src/app/help/help-home/help-home.component.html + 40 + + + + Questions from students. + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 420 + + + src/app/help/getting-started/getting-started.component.html + 89 + + + src/app/help/help-home/help-home.component.html + 42 + + + + Creating an Account + + src/app/help/getting-started/getting-started.component.html + 6 + + + + All users must create their own account. Teachers must create a teacher account and students must create a student account. Users can create an account by going to the WISE Home Page and clicking on the Register link at the upper right of the screen. + + src/app/help/getting-started/getting-started.component.html + 7,13 + + + + Here are instructions on how to create a teacher account. + + src/app/help/getting-started/getting-started.component.html + 14 + + + + Go to the WISE Home Page. + + src/app/help/getting-started/getting-started.component.html + 16 + + + + Click the Register link at the upper right of the screen. + + src/app/help/getting-started/getting-started.component.html + 17,20 + + + + Click on Teacher. + + src/app/help/getting-started/getting-started.component.html + 21 + + + + Using a WISE Unit + + src/app/help/getting-started/getting-started.component.html + 31 + + + + To use a WISE unit with your class, you must first choose a unit to use and then set up a "Run" of that unit. + + src/app/help/getting-started/getting-started.component.html + 32,35 + + + + Here are instructions on how to set up a Run. + + src/app/help/getting-started/getting-started.component.html + 36 From 939c83747bab95b70d7d3479f9e3dac53de6910e Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 27 Oct 2023 16:33:50 -0700 Subject: [PATCH 17/21] refactor(AnnotationService): ove getAllLatestScoreAnnotations to MilestoneReportService (#1497) --- .../wise5/services/annotationService.ts | 20 ------------ .../wise5/services/milestoneReportService.ts | 31 ++++++++++++++++--- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/assets/wise5/services/annotationService.ts b/src/assets/wise5/services/annotationService.ts index 7e9c58b2715..06987e54ea7 100644 --- a/src/assets/wise5/services/annotationService.ts +++ b/src/assets/wise5/services/annotationService.ts @@ -640,26 +640,6 @@ export class AnnotationService { return this.annotations.filter((annotation) => annotation.studentWorkId === studentWorkId); } - getAllLatestScoreAnnotations(nodeId, componentId, periodId) { - const workgroupIdsFound = {}; - const latestScoreAnnotations = []; - for (let a = this.annotations.length - 1; a >= 0; a--) { - const annotation = this.annotations[a]; - const workgroupId = annotation.toWorkgroupId; - if ( - workgroupIdsFound[workgroupId] == null && - nodeId === annotation.nodeId && - componentId === annotation.componentId && - (periodId === -1 || periodId === annotation.periodId) && - ('score' === annotation.type || 'autoScore' === annotation.type) - ) { - workgroupIdsFound[workgroupId] = annotation; - latestScoreAnnotations.push(annotation); - } - } - return latestScoreAnnotations; - } - broadcastAnnotationSavedToServer(annotation: Annotation): void { this.annotationSavedToServerSource.next(annotation); } diff --git a/src/assets/wise5/services/milestoneReportService.ts b/src/assets/wise5/services/milestoneReportService.ts index 041c129ef53..56ebe394454 100644 --- a/src/assets/wise5/services/milestoneReportService.ts +++ b/src/assets/wise5/services/milestoneReportService.ts @@ -2,6 +2,8 @@ import { Injectable } from '@angular/core'; import { AnnotationService } from './annotationService'; import { ProjectService } from './projectService'; import { MilestoneCriteriaEvaluator } from '../classroomMonitor/milestones/milestoneCriteriaEvaluator'; +import { Annotation } from '../common/Annotation'; +import { isMatchingPeriods } from '../common/period/period'; @Injectable() export class MilestoneReportService { @@ -72,11 +74,7 @@ export class MilestoneReportService { reportSettings: any ) { const aggregate = {}; - const scoreAnnotations = this.annotationService.getAllLatestScoreAnnotations( - nodeId, - componentId, - periodId - ); + const scoreAnnotations = this.getAllLatestScoreAnnotations(nodeId, componentId, periodId); for (const scoreAnnotation of scoreAnnotations) { if (scoreAnnotation.type === 'autoScore') { this.addDataToAggregate(aggregate, scoreAnnotation, reportSettings); @@ -100,6 +98,29 @@ export class MilestoneReportService { return aggregate; } + private getAllLatestScoreAnnotations( + nodeId: string, + componentId: string, + periodId: number + ): Annotation[] { + return this.annotationService + .getAnnotationsByNodeIdComponentId(nodeId, componentId) + .filter( + (annotation) => + isMatchingPeriods(annotation.periodId, periodId) && + ['autoScore', 'score'].includes(annotation.type) + ) + .reduceRight( + (latestAnnotations, annotation) => + latestAnnotations.some( + (latestAnnotation) => latestAnnotation.toWorkgroupId === annotation.toWorkgroupId + ) + ? latestAnnotations + : latestAnnotations.concat(annotation), + [] + ); + } + private mergeAutoScoreAndTeacherScore( autoScoreAnnotation: any, teacherScoreAnnotation: any, From 082555c0586596603d09d4a253417c56332219ca Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Mon, 30 Oct 2023 08:44:28 -0700 Subject: [PATCH 18/21] refactor(NodeService): Remove currentNodeHasTransitionLogic() (#1498) --- src/assets/wise5/services/nodeService.ts | 11 ------ src/assets/wise5/vle/node/node.component.ts | 38 ++++++++------------- 2 files changed, 15 insertions(+), 34 deletions(-) diff --git a/src/assets/wise5/services/nodeService.ts b/src/assets/wise5/services/nodeService.ts index a539f6ec9a4..ab6dacc0a50 100644 --- a/src/assets/wise5/services/nodeService.ts +++ b/src/assets/wise5/services/nodeService.ts @@ -297,17 +297,6 @@ export class NodeService { return availableTransitions; } - currentNodeHasTransitionLogic() { - const currentNode: any = this.DataService.getCurrentNode(); - if (currentNode != null) { - const transitionLogic = currentNode.transitionLogic; - if (transitionLogic != null) { - return true; - } - } - return false; - } - /** * Evaluate the transition logic for the current node and create branch * path taken events if necessary. diff --git a/src/assets/wise5/vle/node/node.component.ts b/src/assets/wise5/vle/node/node.component.ts index 3692d6ee756..34db370d5f0 100644 --- a/src/assets/wise5/vle/node/node.component.ts +++ b/src/assets/wise5/vle/node/node.component.ts @@ -151,10 +151,7 @@ export class NodeComponent implements OnInit { this.dirtySubmitComponentIds = []; this.updateComponentVisibility(); - if ( - this.nodeService.currentNodeHasTransitionLogic() && - this.nodeService.evaluateTransitionLogicOn('enterNode') - ) { + if (this.nodeService.evaluateTransitionLogicOn('enterNode')) { this.nodeService.evaluateTransitionLogic(); } @@ -204,10 +201,7 @@ export class NodeComponent implements OnInit { ngOnDestroy() { this.stopAutoSaveInterval(); this.nodeUnloaded(this.node.id); - if ( - this.nodeService.currentNodeHasTransitionLogic() && - this.nodeService.evaluateTransitionLogicOn('exitNode') - ) { + if (this.nodeService.evaluateTransitionLogicOn('exitNode')) { this.nodeService.evaluateTransitionLogic(); } this.subscriptions.unsubscribe(); @@ -286,23 +280,21 @@ export class NodeComponent implements OnInit { .saveToServer(componentStates, componentEvents, componentAnnotations) .then((savedStudentDataResponse) => { if (savedStudentDataResponse) { - if (this.nodeService.currentNodeHasTransitionLogic()) { - if (this.nodeService.evaluateTransitionLogicOn('studentDataChanged')) { - this.nodeService.evaluateTransitionLogic(); - } - if (this.nodeService.evaluateTransitionLogicOn('scoreChanged')) { - if (componentAnnotations != null && componentAnnotations.length > 0) { - let evaluateTransitionLogic = false; - for (const componentAnnotation of componentAnnotations) { - if (componentAnnotation != null) { - if (componentAnnotation.type === 'autoScore') { - evaluateTransitionLogic = true; - } + if (this.nodeService.evaluateTransitionLogicOn('studentDataChanged')) { + this.nodeService.evaluateTransitionLogic(); + } + if (this.nodeService.evaluateTransitionLogicOn('scoreChanged')) { + if (componentAnnotations != null && componentAnnotations.length > 0) { + let evaluateTransitionLogic = false; + for (const componentAnnotation of componentAnnotations) { + if (componentAnnotation != null) { + if (componentAnnotation.type === 'autoScore') { + evaluateTransitionLogic = true; } } - if (evaluateTransitionLogic) { - this.nodeService.evaluateTransitionLogic(); - } + } + if (evaluateTransitionLogic) { + this.nodeService.evaluateTransitionLogic(); } } } From f675f81edf627adeb715f92f866e3328768bd993 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Mon, 30 Oct 2023 12:34:24 -0700 Subject: [PATCH 19/21] refactor(StudentDataService): Move getNotebookItemsByNodeId() (#1499) --- src/app/services/studentDataService.spec.ts | 27 - ...mberOfNotesOnThisStepConstraintStrategy.ts | 6 +- .../wise5/services/studentDataService.ts | 10 - src/messages.xlf | 644 +++++++++--------- 4 files changed, 327 insertions(+), 360 deletions(-) diff --git a/src/app/services/studentDataService.spec.ts b/src/app/services/studentDataService.spec.ts index fb4534679c0..383d34699ec 100644 --- a/src/app/services/studentDataService.spec.ts +++ b/src/app/services/studentDataService.spec.ts @@ -31,7 +31,6 @@ describe('StudentDataService', () => { shouldEvaluateHasWorkCreatedAfterTimestampFalse(); shouldEvaluateHasWorkCreatedAfterTimestampTrue(); shouldGetBranchPathTakenEventsByNodeId(); - shouldGetNotebookItemsByNodeId(); shouldHandleSaveStudentWorkToServerSuccess(); shouldHandleSaveEventsToServerSuccess(); shouldHandleSaveAnnotationsToServerSuccess(); @@ -94,32 +93,6 @@ function shouldGetBranchPathTakenEventsByNodeId() { }); } -function shouldGetNotebookItemsByNodeId() { - it('should get notebook items by node id', () => { - const notebook = { - allItems: [ - { nodeId: 'node1' }, - { nodeId: 'node1' }, - { nodeId: 'node1' }, - { nodeId: 'node1' }, - { nodeId: 'node1' }, - { nodeId: 'node2' }, - { nodeId: 'node2' }, - { nodeId: 'node2' }, - { nodeId: 'node2' }, - { nodeId: 'node2' } - ] - }; - const notebookItems = service.getNotebookItemsByNodeId(notebook, 'node1'); - expect(notebookItems.length).toEqual(5); - expect(notebookItems[0].nodeId).toEqual('node1'); - expect(notebookItems[1].nodeId).toEqual('node1'); - expect(notebookItems[2].nodeId).toEqual('node1'); - expect(notebookItems[3].nodeId).toEqual('node1'); - expect(notebookItems[4].nodeId).toEqual('node1'); - }); -} - function shouldHandleSaveStudentWorkToServerSuccess() { xit('should handle save student work to server success', () => { service.studentData = { diff --git a/src/assets/wise5/common/constraint/strategies/AddXNumberOfNotesOnThisStepConstraintStrategy.ts b/src/assets/wise5/common/constraint/strategies/AddXNumberOfNotesOnThisStepConstraintStrategy.ts index 66bc5e2fb5a..16c30f9344e 100644 --- a/src/assets/wise5/common/constraint/strategies/AddXNumberOfNotesOnThisStepConstraintStrategy.ts +++ b/src/assets/wise5/common/constraint/strategies/AddXNumberOfNotesOnThisStepConstraintStrategy.ts @@ -3,7 +3,7 @@ import { AbstractConstraintStrategy } from './AbstractConstraintStrategy'; export class AddXNumberOfNotesOnThisStepConstraintStrategy extends AbstractConstraintStrategy { evaluate(criteria: any): boolean { try { - const notebookItemsByNodeId = this.dataService.getNotebookItemsByNodeId( + const notebookItemsByNodeId = this.getNotebookItemsByNodeId( this.notebookService.getNotebookByWorkgroup(), criteria.params.nodeId ); @@ -11,4 +11,8 @@ export class AddXNumberOfNotesOnThisStepConstraintStrategy extends AbstractConst } catch (e) {} return false; } + + private getNotebookItemsByNodeId(notebook: any, nodeId: string): any[] { + return notebook.allItems.filter((item) => item.nodeId === nodeId); + } } diff --git a/src/assets/wise5/services/studentDataService.ts b/src/assets/wise5/services/studentDataService.ts index 981d7e7b5a3..45c73c52230 100644 --- a/src/assets/wise5/services/studentDataService.ts +++ b/src/assets/wise5/services/studentDataService.ts @@ -185,16 +185,6 @@ export class StudentDataService extends DataService { ); } - getNotebookItemsByNodeId(notebook, nodeId) { - const notebookItemsByNodeId = []; - for (const notebookItem of notebook.allItems) { - if (notebookItem.nodeId === nodeId) { - notebookItemsByNodeId.push(notebookItem); - } - } - return notebookItemsByNodeId; - } - populateHistories(events) { this.stackHistory = []; for (const event of events) { diff --git a/src/messages.xlf b/src/messages.xlf index 33af4a6d38b..40b14793917 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -3354,138 +3354,405 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.1 - - Student Frequently Asked Questions + + Getting Started - src/app/help/faq/student-faq/student-faq.component.html + src/app/help/faq/getting-started/getting-started.component.html 3 - - - Table of Contents src/app/help/faq/student-faq/student-faq.component.html - 6 + 132 src/app/help/faq/teacher-faq/teacher-faq.component.html + 407 + + + src/app/help/help-home/help-home.component.html + 18 + + + + Creating an Account + + src/app/help/faq/getting-started/getting-started.component.html 6 + + + All users must create their own account. Teachers must create a teacher account and students must create a student account. Users can create an account by going to the WISE Home Page and clicking on the Register link at the upper right of the screen. - src/app/privacy/privacy.component.html - 4 + src/app/help/faq/getting-started/getting-started.component.html + 7,13 - - General Questions + + Here are instructions on how to create a teacher account. - src/app/help/faq/student-faq/student-faq.component.html - 9 + src/app/help/faq/getting-started/getting-started.component.html + 14 + + + Go to the WISE Home Page. - src/app/help/faq/student-faq/student-faq.component.html + src/app/help/faq/getting-started/getting-started.component.html 16 + + + Click the Register link at the upper right of the screen. - src/app/help/faq/teacher-faq/teacher-faq.component.html - 9 + src/app/help/faq/getting-started/getting-started.component.html + 17,20 + + + + Click on Teacher. + + src/app/help/faq/getting-started/getting-started.component.html + 21 + + + + Choose to sign up with your email or with your Google Account. + + src/app/help/faq/getting-started/getting-started.component.html + 22 + + + src/app/help/faq/student-faq/student-faq.component.html + 21 src/app/help/faq/teacher-faq/teacher-faq.component.html - 28 + 33 - - Technical Questions + + Fill out the form and submit it. + + src/app/help/faq/getting-started/getting-started.component.html + 23 + src/app/help/faq/student-faq/student-faq.component.html - 12 + 22 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 34 + + + + If you created an account using your email, you will be given a username that you will need to remember. Your username will be your first name and your last name with no space inbetween. There may be a number added at the end of your username if someone has the same name as you. + + src/app/help/faq/getting-started/getting-started.component.html + 24,28 src/app/help/faq/student-faq/student-faq.component.html - 61 + 23,27 src/app/help/faq/teacher-faq/teacher-faq.component.html - 24 + 35,39 + + + + Using a WISE Unit + + src/app/help/faq/getting-started/getting-started.component.html + 31 + + + + To use a WISE unit with your class, you must first choose a unit to use and then set up a "Run" of that unit. + + src/app/help/faq/getting-started/getting-started.component.html + 32,35 + + + + Here are instructions on how to set up a Run. + + src/app/help/faq/getting-started/getting-started.component.html + 36 + + + + Sign in to WISE with your teacher account. + + src/app/help/faq/getting-started/getting-started.component.html + 38 src/app/help/faq/teacher-faq/teacher-faq.component.html - 328 + 43 - - How do I create an account? + + Click the "Unit Library" tab. - src/app/help/faq/student-faq/student-faq.component.html - 17 + src/app/help/faq/getting-started/getting-started.component.html + 39 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 44 src/app/help/faq/teacher-faq/teacher-faq.component.html + 201 + + + + Find a project that you would like to use with your class. + + src/app/help/faq/getting-started/getting-started.component.html + 40 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 45 + + + + Click on the project to open the information for the project. + + src/app/help/faq/getting-started/getting-started.component.html + 41 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 46 + + + + Click the "Use With Class" button. + + src/app/help/faq/getting-started/getting-started.component.html + 42 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 47 + + + + Choose the periods you will use the project in. + + src/app/help/faq/getting-started/getting-started.component.html + 43 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 48 + + + + Choose the number of students per team. Choosing 1-3 will allow students to work together in a team. + + src/app/help/faq/getting-started/getting-started.component.html + 44,47 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 49,52 + + + + Choose the start date. Students will not be able to use the project until this date. + + src/app/help/faq/getting-started/getting-started.component.html + 48,50 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 53,55 + + + + Click "Create Run". + + src/app/help/faq/getting-started/getting-started.component.html + 51 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 56 + + + + The run will be created and added to your Teacher Home. + + src/app/help/faq/getting-started/getting-started.component.html + 52 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 57 + + + + Copy the "Access Code" for the new run and write it down somewhere like on the white board. Students will need to use this access code to work on the run you created. + + src/app/help/faq/getting-started/getting-started.component.html + 53,56 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 58,61 + + + + Teacher FAQ + + src/app/help/faq/getting-started/getting-started.component.html + 76 + + + src/app/help/faq/student-faq/student-faq.component.html + 143 + + + src/app/help/help-home/help-home.component.html 29 - - Go to the Register page. + + Questions from teachers. + + src/app/help/faq/getting-started/getting-started.component.html + 78 + src/app/help/faq/student-faq/student-faq.component.html - 19 + 145 - src/app/help/faq/teacher-faq/teacher-faq.component.html + src/app/help/help-home/help-home.component.html 31 - - Click on Student. + + Student FAQ + + src/app/help/faq/getting-started/getting-started.component.html + 87 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 418 + + + src/app/help/help-home/help-home.component.html + 40 + + + + Questions from students. + + src/app/help/faq/getting-started/getting-started.component.html + 89 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 420 + + + src/app/help/help-home/help-home.component.html + 42 + + + + Student Frequently Asked Questions src/app/help/faq/student-faq/student-faq.component.html - 20 + 3 - - Choose to sign up with your email or with your Google Account. + + Table of Contents src/app/help/faq/student-faq/student-faq.component.html - 21 + 6 src/app/help/faq/teacher-faq/teacher-faq.component.html - 33 + 6 - src/app/help/getting-started/getting-started.component.html - 22 + src/app/privacy/privacy.component.html + 4 - - Fill out the form and submit it. + + General Questions src/app/help/faq/student-faq/student-faq.component.html - 22 + 9 + + + src/app/help/faq/student-faq/student-faq.component.html + 16 src/app/help/faq/teacher-faq/teacher-faq.component.html - 34 + 9 - src/app/help/getting-started/getting-started.component.html - 23 + src/app/help/faq/teacher-faq/teacher-faq.component.html + 28 - - If you created an account using your email, you will be given a username that you will need to remember. Your username will be your first name and your last name with no space inbetween. There may be a number added at the end of your username if someone has the same name as you. + + Technical Questions src/app/help/faq/student-faq/student-faq.component.html - 23,27 + 12 + + + src/app/help/faq/student-faq/student-faq.component.html + 61 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 24 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 328 + + + + How do I create an account? + + src/app/help/faq/student-faq/student-faq.component.html + 17 + + + src/app/help/faq/teacher-faq/teacher-faq.component.html + 29 + + + + Go to the Register page. + + src/app/help/faq/student-faq/student-faq.component.html + 19 src/app/help/faq/teacher-faq/teacher-faq.component.html - 35,39 + 31 + + + Click on Student. - src/app/help/getting-started/getting-started.component.html - 24,28 + src/app/help/faq/student-faq/student-faq.component.html + 20 @@ -3756,25 +4023,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.382,387 - - Getting Started - - src/app/help/faq/student-faq/student-faq.component.html - 132 - - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 407 - - - src/app/help/getting-started/getting-started.component.html - 3 - - - src/app/help/help-home/help-home.component.html - 18 - - Information for new users. @@ -3790,36 +4038,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.20 - - Teacher FAQ - - src/app/help/faq/student-faq/student-faq.component.html - 143 - - - src/app/help/getting-started/getting-started.component.html - 76 - - - src/app/help/help-home/help-home.component.html - 29 - - - - Questions from teachers. - - src/app/help/faq/student-faq/student-faq.component.html - 145 - - - src/app/help/getting-started/getting-started.component.html - 78 - - - src/app/help/help-home/help-home.component.html - 31 - - Teacher Frequently Asked Questions @@ -3885,131 +4103,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.41 - - Sign in to WISE with your teacher account. - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 43 - - - src/app/help/getting-started/getting-started.component.html - 38 - - - - Click the "Unit Library" tab. - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 44 - - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 201 - - - src/app/help/getting-started/getting-started.component.html - 39 - - - - Find a project that you would like to use with your class. - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 45 - - - src/app/help/getting-started/getting-started.component.html - 40 - - - - Click on the project to open the information for the project. - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 46 - - - src/app/help/getting-started/getting-started.component.html - 41 - - - - Click the "Use With Class" button. - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 47 - - - src/app/help/getting-started/getting-started.component.html - 42 - - - - Choose the periods you will use the project in. - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 48 - - - src/app/help/getting-started/getting-started.component.html - 43 - - - - Choose the number of students per team. Choosing 1-3 will allow students to work together in a team. - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 49,52 - - - src/app/help/getting-started/getting-started.component.html - 44,47 - - - - Choose the start date. Students will not be able to use the project until this date. - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 53,55 - - - src/app/help/getting-started/getting-started.component.html - 48,50 - - - - Click "Create Run". - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 56 - - - src/app/help/getting-started/getting-started.component.html - 51 - - - - The run will be created and added to your Teacher Home. - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 57 - - - src/app/help/getting-started/getting-started.component.html - 52 - - - - Copy the "Access Code" for the new run and write it down somewhere like on the white board. Students will need to use this access code to work on the run you created. - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 58,61 - - - src/app/help/getting-started/getting-started.component.html - 53,56 - - Should I register my students for WISE or have them do it themselves? @@ -4689,99 +4782,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.356 - - Student FAQ - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 418 - - - src/app/help/getting-started/getting-started.component.html - 87 - - - src/app/help/help-home/help-home.component.html - 40 - - - - Questions from students. - - src/app/help/faq/teacher-faq/teacher-faq.component.html - 420 - - - src/app/help/getting-started/getting-started.component.html - 89 - - - src/app/help/help-home/help-home.component.html - 42 - - - - Creating an Account - - src/app/help/getting-started/getting-started.component.html - 6 - - - - All users must create their own account. Teachers must create a teacher account and students must create a student account. Users can create an account by going to the WISE Home Page and clicking on the Register link at the upper right of the screen. - - src/app/help/getting-started/getting-started.component.html - 7,13 - - - - Here are instructions on how to create a teacher account. - - src/app/help/getting-started/getting-started.component.html - 14 - - - - Go to the WISE Home Page. - - src/app/help/getting-started/getting-started.component.html - 16 - - - - Click the Register link at the upper right of the screen. - - src/app/help/getting-started/getting-started.component.html - 17,20 - - - - Click on Teacher. - - src/app/help/getting-started/getting-started.component.html - 21 - - - - Using a WISE Unit - - src/app/help/getting-started/getting-started.component.html - 31 - - - - To use a WISE unit with your class, you must first choose a unit to use and then set up a "Run" of that unit. - - src/app/help/getting-started/getting-started.component.html - 32,35 - - - - Here are instructions on how to set up a Run. - - src/app/help/getting-started/getting-started.component.html - 36 - - What's New? @@ -21007,21 +21007,21 @@ If this problem continues, let your teacher know and move on to the next activit StudentDataService.saveComponentEvent: component, category, event args must not be null src/assets/wise5/services/studentDataService.ts - 251 + 241 StudentDataService.saveComponentEvent: nodeId, componentId, componentType must not be null src/assets/wise5/services/studentDataService.ts - 261 + 251 StudentDataService.saveVLEEvent: category and event args must not be null src/assets/wise5/services/studentDataService.ts - 270 + 260 From b02f5f4151aeeb43f3ccfc8a98c48d6b2a0df383 Mon Sep 17 00:00:00 2001 From: Geoffrey Kwan Date: Tue, 31 Oct 2023 11:15:57 -0400 Subject: [PATCH 20/21] fix(Authoring): Recovery view does not load when project is broken (#1489) --- src/app/services/projectService.spec.ts | 10 -- src/app/teacher/authoring-routing.module.ts | 10 +- .../recovery-authoring-project.resolver.ts | 16 +++ .../recovery-authoring.component.html | 97 +++++++++++-------- .../recovery-authoring.component.scss | 20 ++-- .../recovery-authoring.component.spec.ts | 9 +- .../recovery-authoring.component.ts | 12 ++- src/assets/wise5/services/projectService.ts | 32 +++--- src/messages.xlf | 73 +++++++------- 9 files changed, 156 insertions(+), 123 deletions(-) create mode 100644 src/app/teacher/recovery-authoring-project.resolver.ts diff --git a/src/app/services/projectService.spec.ts b/src/app/services/projectService.spec.ts index ebd04b06bed..f2b706d3501 100644 --- a/src/app/services/projectService.spec.ts +++ b/src/app/services/projectService.spec.ts @@ -43,7 +43,6 @@ describe('ProjectService', () => { shouldReplaceAssetPathsInHtmlComponentContent(); shouldNotReplaceAssetPathsInHtmlComponentContent(); shouldRetrieveProjectWhenConfigProjectURLIsValid(); - shouldNotRetrieveProjectWhenConfigProjectURLIsUndefined(); shouldGetDefaultThemePath(); shouldReturnTheStartNodeOfTheProject(); shouldReturnTheNodeByNodeId(); @@ -157,15 +156,6 @@ function shouldRetrieveProjectWhenConfigProjectURLIsValid() { }); } -function shouldNotRetrieveProjectWhenConfigProjectURLIsUndefined() { - it('should not retrieve project when Config.projectURL is undefined', () => { - spyOn(configService, 'getConfigParam').and.returnValue(null); - const project = service.retrieveProject(); - expect(configService.getConfigParam).toHaveBeenCalledWith('projectURL'); - expect(project).toBeNull(); - }); -} - function shouldGetDefaultThemePath() { it('should get default theme path', () => { spyOn(configService, 'getConfigParam').and.returnValue(wiseBaseURL); diff --git a/src/app/teacher/authoring-routing.module.ts b/src/app/teacher/authoring-routing.module.ts index f3456f3414b..52a68784f44 100644 --- a/src/app/teacher/authoring-routing.module.ts +++ b/src/app/teacher/authoring-routing.module.ts @@ -38,6 +38,7 @@ import { ProjectAuthoringParentComponent } from '../../assets/wise5/authoringToo import { ChooseImportUnitComponent } from '../authoring-tool/import-step/choose-import-unit/choose-import-unit.component'; import { NodeAuthoringParentComponent } from '../../assets/wise5/authoringTool/node/node-authoring-parent/node-authoring-parent.component'; import { AddLessonChooseTemplateComponent } from '../../assets/wise5/authoringTool/addLesson/add-lesson-choose-template/add-lesson-choose-template.component'; +import { RecoveryAuthoringProjectResolver } from './recovery-authoring-project.resolver'; const routes: Routes = [ { @@ -46,8 +47,12 @@ const routes: Routes = [ resolve: { config: AuthoringConfigResolver }, children: [ { path: 'home', component: ProjectListComponent }, - { path: 'new-unit', component: AddProjectComponent }, + { + path: 'recovery/:unitId', + component: RecoveryAuthoringComponent, + resolve: { project: RecoveryAuthoringProjectResolver } + }, { path: 'unit/:unitId', component: ProjectAuthoringParentComponent, @@ -165,8 +170,7 @@ const routes: Routes = [ } ] }, - { path: 'notebook', component: NotebookAuthoringComponent }, - { path: 'recovery', component: RecoveryAuthoringComponent } + { path: 'notebook', component: NotebookAuthoringComponent } ] } ] diff --git a/src/app/teacher/recovery-authoring-project.resolver.ts b/src/app/teacher/recovery-authoring-project.resolver.ts new file mode 100644 index 00000000000..f2557b57635 --- /dev/null +++ b/src/app/teacher/recovery-authoring-project.resolver.ts @@ -0,0 +1,16 @@ +import { inject } from '@angular/core'; +import { ActivatedRouteSnapshot, ResolveFn, RouterStateSnapshot } from '@angular/router'; +import { Observable, switchMap } from 'rxjs'; +import { ProjectService } from '../../assets/wise5/services/projectService'; +import { ConfigService } from '../../assets/wise5/services/configService'; + +export const RecoveryAuthoringProjectResolver: ResolveFn = ( + route: ActivatedRouteSnapshot, + state: RouterStateSnapshot, + configService: ConfigService = inject(ConfigService), + projectService: ProjectService = inject(ProjectService) +): Observable => { + return configService + .retrieveConfig(`/api/author/config/${route.params['unitId']}`) + .pipe(switchMap(() => projectService.retrieveProjectWithoutParsing())); +}; diff --git a/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html b/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html index 6a7906b7a09..7d620df019e 100644 --- a/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html +++ b/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html @@ -1,49 +1,60 @@ -
      -
      - - -
      -
      -
      JSON Valid
      -
      JSON Invalid
      -
      -
      - {{ globalMessage.text }} {{ globalMessage.time | date: 'medium' }} +
      +

      Recovery View

      +
      +
      + + +
      +
      +
      JSON Valid
      +
      JSON Invalid
      +
      +
      + {{ globalMessage.text }} {{ globalMessage.time | date: 'medium' }} +
      -
      -
      - Warning: Modifying the JSON may break the project. Please make a backup copy of the JSON before - you modify it. -
      -
      -
      Potential Problems
      -
      -
      {{ badNode.nodeId }}
      -
      - This group references the node ID but the node does not exist: - {{ badNode.referencedIdsThatDoNotExist }} -
      -
      - This group references the same node ID multiple times: - {{ badNode.referencedIdsThatAreDuplicated }} +
      + Warning: Modifying the JSON may break the project. Please make a backup copy of the JSON before + you modify it. +
      +
      +
      Potential Problems
      +
      +
      {{ badNode.nodeId }}
      +
      + This group references the node ID but the node does not exist: + {{ badNode.referencedIdsThatDoNotExist }} +
      +
      + This group references the same node ID multiple times: + {{ badNode.referencedIdsThatAreDuplicated }} +
      +
      This node has a transition to null
      -
      This node has a transition to null
      -
      -
      - - Edit Unit JSON - - +
      + + Edit Unit JSON + + +
      diff --git a/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.scss b/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.scss index 35cd60020ae..99df6c2161a 100644 --- a/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.scss +++ b/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.scss @@ -1,15 +1,5 @@ -.main-box { - position: relative; - padding: 16px !important; -} - -.top-div { - background-color: white; - position: sticky; - top: 0px; - z-index: 2; - padding-top: 4px; - padding-bottom: 4px; +.body { + padding: 0px 32px; } .save-bar { @@ -24,6 +14,10 @@ color: red; } +.view-title { + margin-bottom: 20px; +} + .warning-div { margin-bottom: 20px; color: red; @@ -42,7 +36,7 @@ border: 1px solid red; border-radius: 8px; padding: 8px; - margin-bottom: 4px; + margin-bottom: 20px; } .node-id { diff --git a/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.spec.ts b/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.spec.ts index c48f5e0ac59..bb0d44698db 100644 --- a/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.spec.ts +++ b/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.spec.ts @@ -7,6 +7,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { StudentTeacherCommonServicesModule } from '../../../../app/student-teacher-common-services.module'; import { TeacherProjectService } from '../../services/teacherProjectService'; import { RecoveryAuthoringComponent } from './recovery-authoring.component'; +import { ActivatedRoute, RouterModule } from '@angular/router'; class MockTeacherProjectService { project = { @@ -46,9 +47,13 @@ describe('RecoveryAuthoringComponent', () => { HttpClientTestingModule, MatDialogModule, MatInputModule, + RouterModule, StudentTeacherCommonServicesModule ], - providers: [{ provide: TeacherProjectService, useClass: MockTeacherProjectService }] + providers: [ + { provide: ActivatedRoute, useValue: { snapshot: { paramMap: { get: () => '1' } } } }, + { provide: TeacherProjectService, useClass: MockTeacherProjectService } + ] }).compileComponents(); }); @@ -81,7 +86,7 @@ function detectJSONValidity() { function setJSONAndExpect(json: string, jsonIsValid: boolean, saveButtonEnabled: boolean) { setProjectJSONStringAndTriggerChange(json); - expect(component.jsonIsValid).toEqual(jsonIsValid); + expect(component.jsonValid).toEqual(jsonIsValid); expect(component.saveButtonEnabled).toEqual(saveButtonEnabled); } diff --git a/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.ts b/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.ts index 944ef7ad822..81dc973f4e4 100644 --- a/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.ts +++ b/src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.ts @@ -4,6 +4,7 @@ import { NotificationService } from '../../services/notificationService'; import { TeacherProjectService } from '../../services/teacherProjectService'; import { NodeRecoveryAnalysis } from '../../../../app/domain/nodeRecoveryAnalysis'; import { isValidJSONString } from '../../common/string/string'; +import { ActivatedRoute } from '@angular/router'; @Component({ selector: 'recovery-authoring', @@ -13,17 +14,20 @@ import { isValidJSONString } from '../../common/string/string'; export class RecoveryAuthoringComponent implements OnInit { badNodes: NodeRecoveryAnalysis[] = []; protected globalMessage: any; - jsonIsValid: boolean; + jsonValid: boolean; projectJSONString: string; saveButtonEnabled: boolean = false; private subscriptions: Subscription = new Subscription(); + protected unitId: string; constructor( + private route: ActivatedRoute, private notificationService: NotificationService, private projectService: TeacherProjectService ) {} ngOnInit(): void { + this.unitId = this.route.snapshot.paramMap.get('unitId'); this.projectJSONString = JSON.stringify(this.projectService.project, null, 4); this.checkProjectJSONValidity(); this.subscribeToGlobalMessage(); @@ -36,14 +40,14 @@ export class RecoveryAuthoringComponent implements OnInit { projectJSONChanged(): void { this.checkProjectJSONValidity(); - this.saveButtonEnabled = this.jsonIsValid; - if (this.jsonIsValid) { + this.saveButtonEnabled = this.jsonValid; + if (this.jsonValid) { this.checkNodes(); } } private checkProjectJSONValidity(): void { - this.jsonIsValid = isValidJSONString(this.projectJSONString); + this.jsonValid = isValidJSONString(this.projectJSONString); } private subscribeToGlobalMessage(): void { diff --git a/src/assets/wise5/services/projectService.ts b/src/assets/wise5/services/projectService.ts index 730e034a63d..9628776a98f 100644 --- a/src/assets/wise5/services/projectService.ts +++ b/src/assets/wise5/services/projectService.ts @@ -772,25 +772,31 @@ export class ProjectService { * Retrieves the project JSON from Config.projectURL and returns it. * If Config.projectURL is undefined, returns null. */ - retrieveProject(parseProject: boolean = true): any { - let projectURL = this.configService.getConfigParam('projectURL'); - if (projectURL == null) { - return null; - } - const headers = new HttpHeaders().set('cache-control', 'no-cache'); - return this.http.get(projectURL, { headers: headers }).pipe( + retrieveProject(): Observable { + return this.makeProjectRequest().pipe( tap((projectJSON: any) => { - if (parseProject) { - this.setProject(projectJSON); - } else { - this.project = projectJSON; - this.metadata = projectJSON.metadata; - } + this.setProject(projectJSON); + return projectJSON; + }) + ); + } + + retrieveProjectWithoutParsing(): Observable { + return this.makeProjectRequest().pipe( + tap((projectJSON: any) => { + this.project = projectJSON; + this.metadata = projectJSON.metadata; return projectJSON; }) ); } + private makeProjectRequest(): Observable { + const projectURL = this.configService.getConfigParam('projectURL'); + const headers = new HttpHeaders().set('cache-control', 'no-cache'); + return this.http.get(projectURL, { headers: headers }); + } + getThemePath(): string { return this.getDefaultThemePath(); } diff --git a/src/messages.xlf b/src/messages.xlf index 40b14793917..b0bb38d918d 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -6334,6 +6334,10 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/app/notebook/notebook-report/notebook-report.component.html 72,74 + + src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html + 11,13 + src/assets/wise5/themes/default/notebook/edit-notebook-item-dialog/edit-notebook-item-dialog.component.html 80,82 @@ -9462,7 +9466,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html - 39 + 49 @@ -12257,68 +12261,67 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.96 - - Save + + Recovery View src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html - 3,5 + 2 - - Go to Authoring View + + Go to Authoring View src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html - 6 + 14,16 JSON Valid src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html - 9 + 19 JSON Invalid src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html - 10 + 20 - - Warning: Modifying the JSON may break the project. Please make a backup copy of the JSON before you modify it. - + + Warning: Modifying the JSON may break the project. Please make a backup copy of the JSON before you modify it. src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html - 18,21 + 28,31 Potential Problems src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html - 23 + 33 - + This group references the node ID but the node does not exist: src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html - 26,29 + 36,39 - + This group references the same node ID multiple times: src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html - 30,33 + 40,43 This node has a transition to null src/assets/wise5/authoringTool/recovery-authoring/recovery-authoring.component.html - 34 + 44 @@ -20874,112 +20877,112 @@ If this problem continues, let your teacher know and move on to the next activit Complete <b></b> src/assets/wise5/services/projectService.ts - 1174 + 1180 Visit <b></b> src/assets/wise5/services/projectService.ts - 1180 + 1186 Correctly answer <b></b> src/assets/wise5/services/projectService.ts - 1186 + 1192 Obtain a score of <b></b> on <b></b> src/assets/wise5/services/projectService.ts - 1201 + 1207 You must choose "" on "" src/assets/wise5/services/projectService.ts - 1209 + 1215 Submit <b></b> time on <b></b> src/assets/wise5/services/projectService.ts - 1221 + 1227 Submit <b></b> times on <b></b> src/assets/wise5/services/projectService.ts - 1223 + 1229 Take the branch path from <b></b> to <b></b> src/assets/wise5/services/projectService.ts - 1230 + 1236 Write <b></b> words on <b></b> src/assets/wise5/services/projectService.ts - 1236 + 1242 "" is visible src/assets/wise5/services/projectService.ts - 1242 + 1248 "" is visitable src/assets/wise5/services/projectService.ts - 1248 + 1254 Add <b></b> note on <b></b> src/assets/wise5/services/projectService.ts - 1255 + 1261 Add <b></b> notes on <b></b> src/assets/wise5/services/projectService.ts - 1257 + 1263 You must fill in <b></b> row in the <b>Table</b> on <b></b> src/assets/wise5/services/projectService.ts - 1264 + 1270 You must fill in <b></b> rows in the <b>Table</b> on <b></b> src/assets/wise5/services/projectService.ts - 1266 + 1272 Wait for your teacher to unlock the item src/assets/wise5/services/projectService.ts - 1269 + 1275 From bbd4bb02a9fd4a2fa9a78be1455c3968470f8731 Mon Sep 17 00:00:00 2001 From: Geoffrey Kwan Date: Tue, 31 Oct 2023 11:36:28 -0400 Subject: [PATCH 21/21] fix(Classroom Monitor): Grade by Step expand lesson console error (#1501) --- .../node-progress-view/node-progress-view.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeProgress/node-progress-view/node-progress-view.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeProgress/node-progress-view/node-progress-view.component.ts index 8befdf7d0b6..750a95e4598 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeProgress/node-progress-view/node-progress-view.component.ts +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeProgress/node-progress-view/node-progress-view.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; import { TeacherProjectService } from '../../../../services/teacherProjectService'; import { TeacherDataService } from '../../../../services/teacherDataService'; import { Subscription } from 'rxjs'; @@ -20,6 +20,7 @@ export class NodeProgressViewComponent implements OnInit { private subscriptions: Subscription = new Subscription(); constructor( + private changeDetectorRef: ChangeDetectorRef, private configService: ConfigService, private dialog: MatDialog, private projectService: TeacherProjectService, @@ -40,6 +41,10 @@ export class NodeProgressViewComponent implements OnInit { } } + ngAfterViewChecked(): void { + this.changeDetectorRef.detectChanges(); + } + private subscribeToCurrentNodeChanged(): void { this.subscriptions.add( this.dataService.currentNodeChanged$.subscribe(({ currentNode }) => {