diff --git a/src/app/teacher/authoring-tool.module.ts b/src/app/teacher/authoring-tool.module.ts index 44439174c7c..47c6f46a80a 100644 --- a/src/app/teacher/authoring-tool.module.ts +++ b/src/app/teacher/authoring-tool.module.ts @@ -61,10 +61,12 @@ import { CopyComponentButtonComponent } from '../../assets/wise5/authoringTool/n import { SaveIndicatorComponent } from '../../assets/wise5/common/save-indicator/save-indicator.component'; import { ProjectAuthoringLessonComponent } from '../../assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component'; import { ProjectAuthoringStepComponent } from '../../assets/wise5/authoringTool/project-authoring-step/project-authoring-step.component'; +import { AddLessonButtonComponent } from '../../assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component'; @NgModule({ declarations: [ AddComponentButtonComponent, + AddLessonButtonComponent, AddLessonChooseLocationComponent, AddLessonChooseTemplateComponent, AddLessonConfigureComponent, diff --git a/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.html b/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.html new file mode 100644 index 00000000000..2b20f121180 --- /dev/null +++ b/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.html @@ -0,0 +1,20 @@ + + + + + diff --git a/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.scss b/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.spec.ts b/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.spec.ts new file mode 100644 index 00000000000..e204c673798 --- /dev/null +++ b/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.spec.ts @@ -0,0 +1,32 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { AddLessonButtonComponent } from './add-lesson-button.component'; +import { TeacherProjectService } from '../../services/teacherProjectService'; +import { StudentTeacherCommonServicesModule } from '../../../../app/student-teacher-common-services.module'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatIconModule } from '@angular/material/icon'; + +describe('AddLessonButtonComponent', () => { + let component: AddLessonButtonComponent; + let fixture: ComponentFixture; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [AddLessonButtonComponent], + imports: [ + HttpClientTestingModule, + StudentTeacherCommonServicesModule, + MatIconModule, + MatMenuModule + ], + providers: [TeacherProjectService] + }); + fixture = TestBed.createComponent(AddLessonButtonComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.ts b/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.ts new file mode 100644 index 00000000000..e9383531032 --- /dev/null +++ b/src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.ts @@ -0,0 +1,63 @@ +import { Component, Input, ViewChild } from '@angular/core'; +import { TeacherProjectService } from '../../services/teacherProjectService'; +import { temporarilyHighlightElement } from '../../common/dom/dom'; +import { MatMenuTrigger } from '@angular/material/menu'; + +@Component({ + selector: 'add-lesson-button', + templateUrl: './add-lesson-button.component.html', + styleUrls: ['./add-lesson-button.component.scss'] +}) +export class AddLessonButtonComponent { + @Input() active: boolean; + @Input() lessonId: string; + @ViewChild(MatMenuTrigger) menuTrigger: MatMenuTrigger; + + constructor(private projectService: TeacherProjectService) {} + + protected addLesson(): void { + if (this.lessonId == null) { + this.addFirstLesson(); + } else { + this.menuTrigger.openMenu(); + } + } + + protected addLessonBefore(): void { + const previousLessonId = this.projectService.getPreviousNodeId(this.lessonId); + if (previousLessonId == null) { + this.addFirstLesson(); + } else { + const newLesson = this.createNewLesson(); + this.projectService.createNodeAfter(newLesson, previousLessonId); + this.updateProject(newLesson.id); + } + } + + private addFirstLesson(): void { + const newLesson = this.createNewLesson(); + const insertLocation = this.active ? 'group0' : 'inactiveGroups'; + this.projectService.createNodeInside(newLesson, insertLocation); + this.updateProject(newLesson.id); + } + + protected addLessonAfter(): void { + const newLesson = this.createNewLesson(); + this.projectService.createNodeAfter(newLesson, this.lessonId); + this.updateProject(newLesson.id); + } + + private createNewLesson(): any { + return this.projectService.createGroup($localize`New Lesson`); + } + + private updateProject(newNodeId: string): void { + this.projectService.checkPotentialStartNodeIdChangeThenSaveProject().then(() => { + this.projectService.refreshProject(); + // This timeout is used to allow the lesson to be added to the DOM before we highlight it + setTimeout(() => { + temporarilyHighlightElement(newNodeId); + }); + }); + } +} diff --git a/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.html b/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.html index 96f0a618619..a00e134d18c 100644 --- a/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.html +++ b/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.html @@ -63,16 +63,56 @@
- +
- + + + + + +
- This lesson has no steps +
This lesson has no steps
+
diff --git a/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.spec.ts b/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.spec.ts index bad51c75ba3..31e1de48072 100644 --- a/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.spec.ts +++ b/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.spec.ts @@ -18,6 +18,7 @@ import { ProjectAuthoringLessonHarness } from './project-authoring-lesson.harnes import { DeleteNodeService } from '../../services/deleteNodeService'; import { RouterTestingModule } from '@angular/router/testing'; import { CopyNodesService } from '../../services/copyNodesService'; +import { MatMenuModule } from '@angular/material/menu'; let component: ProjectAuthoringLessonComponent; let fixture: ComponentFixture; @@ -27,6 +28,9 @@ const nodeId1 = 'node1'; const nodeId2 = 'node2'; let teacherProjectService: TeacherProjectService; +const node1 = { id: nodeId1, title: 'Step 1' }; +const node2 = { id: nodeId2, title: 'Step 2' }; + describe('ProjectAuthoringLessonComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ @@ -42,6 +46,7 @@ describe('ProjectAuthoringLessonComponent', () => { MatCheckboxModule, MatDialogModule, MatIconModule, + MatMenuModule, RouterTestingModule, StudentTeacherCommonServicesModule ], @@ -56,15 +61,10 @@ describe('ProjectAuthoringLessonComponent', () => { }); teacherProjectService = TestBed.inject(TeacherProjectService); teacherProjectService.idToNode = { - node1: { - id: nodeId1, - title: 'Step 1' - }, - node2: { - id: nodeId2, - title: 'Step 2' - } + node1: node1, + node2: node2 }; + teacherProjectService.project = { nodes: [node1, node2] }; fixture = TestBed.createComponent(ProjectAuthoringLessonComponent); component = fixture.componentInstance; component.lesson = { diff --git a/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.ts b/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.ts index 89d3b695d77..8358b9dde48 100644 --- a/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.ts +++ b/src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.ts @@ -6,6 +6,7 @@ import { NodeTypeSelected } from '../domain/node-type-selected'; import { ExpandEvent } from '../domain/expand-event'; import { DeleteNodeService } from '../../services/deleteNodeService'; import { ActivatedRoute, Router } from '@angular/router'; +import { temporarilyHighlightElement } from '../../common/dom/dom'; @Component({ selector: 'project-authoring-lesson', @@ -63,6 +64,47 @@ export class ProjectAuthoringLessonComponent { } } + protected isFirstNodeInBranchPath(nodeId: string): boolean { + return this.projectService.isFirstNodeInBranchPath(nodeId); + } + + protected addStepBefore(nodeId: string): void { + const newStep = this.createNewEmptyStep(); + if (this.projectService.isFirstStepInLesson(nodeId)) { + this.projectService.createNodeInside(newStep, this.projectService.getParentGroupId(nodeId)); + } else { + this.projectService.createNodeAfter(newStep, this.projectService.getPreviousNodeId(nodeId)); + } + this.updateProject(newStep.id); + } + + protected addStepAfter(nodeId: string): void { + const newStep = this.createNewEmptyStep(); + this.projectService.createNodeAfter(newStep, nodeId); + this.updateProject(newStep.id); + } + + protected addStepInside(nodeId: string): void { + const newStep = this.createNewEmptyStep(); + this.projectService.createNodeInside(newStep, nodeId); + this.updateProject(newStep.id); + } + + private createNewEmptyStep(): any { + return this.projectService.createNode('New Step'); + } + + private updateProject(newNodeId: string): void { + this.projectService.checkPotentialStartNodeIdChangeThenSaveProject().then(() => { + this.projectService.refreshProject(); + // This timeout is used to allow steps to have time to apply background color if they are in a + // branch path + setTimeout(() => { + temporarilyHighlightElement(newNodeId); + }); + }); + } + private saveAndRefreshProject(): void { this.projectService.saveProject(); this.projectService.refreshProject(); diff --git a/src/assets/wise5/authoringTool/project-authoring-step/project-authoring-step.component.scss b/src/assets/wise5/authoringTool/project-authoring-step/project-authoring-step.component.scss index 5dc7d9755c3..cf39f845762 100644 --- a/src/assets/wise5/authoringTool/project-authoring-step/project-authoring-step.component.scss +++ b/src/assets/wise5/authoringTool/project-authoring-step/project-authoring-step.component.scss @@ -1,7 +1,7 @@ .step { height: 50px; padding: 4px; - margin: 4px 30px; + margin: 4px 10px 4px 30px; border: 2px solid #dddddd; border-radius: 6px; position: relative; diff --git a/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html b/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html index 50d20e5cfc0..e943d631274 100644 --- a/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html +++ b/src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html @@ -75,7 +75,11 @@
-
+
+
There are no lessons
+ +
+
+
Unused Lessons
-
There are no Unused Lessons
-
+
+
There are no unused lessons
+ +
+
Unused Lessons [projectId]="projectId" [expanded]="lessonIdToExpanded()[inactiveGroupNode.id]" (onExpandedChanged)="onExpandedChanged($event)" + fxFlex > +
Unused Steps
-
There are no Unused Steps
+
There are no unused steps
; let harness: ProjectAuthoringHarness; +let http: HttpClient; let projectService: TeacherProjectService; let route: ActivatedRoute; let router: Router; @@ -44,6 +54,7 @@ describe('ProjectAuthoringComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [ + AddLessonButtonComponent, ConcurrentAuthorsMessageComponent, NodeAuthoringComponent, NodeIconComponent, @@ -63,6 +74,7 @@ describe('ProjectAuthoringComponent', () => { MatFormFieldModule, MatIconModule, MatInputModule, + MatMenuModule, MatTooltipModule, RouterTestingModule, StudentTeacherCommonServicesModule @@ -79,9 +91,22 @@ describe('ProjectAuthoringComponent', () => { }).compileComponents(); projectService = TestBed.inject(TeacherProjectService); projectService.setProject(copy(demoProjectJSON_import)); + configService = TestBed.inject(ConfigService); + http = TestBed.inject(HttpClient); route = TestBed.inject(ActivatedRoute); router = TestBed.inject(Router); window.history.pushState({}, '', ''); + getConfigParamSpy = spyOn(configService, 'getConfigParam'); + getConfigParamSpy.withArgs('canEditProject').and.returnValue(true); + getConfigParamSpy.withArgs('mode').and.returnValue('author'); + getConfigParamSpy.withArgs('saveProjectURL').and.returnValue('/api/author/project/save/1'); + spyOn(configService, 'getMyUserInfo').and.returnValue({ + userId: 4, + firstName: 'Spongebob', + lastName: 'Squarepants', + username: 'spongebobsquarepants' + }); + spyOn(http, 'post').and.returnValue(of({ status: 'success' }) as any); fixture = TestBed.createComponent(ProjectAuthoringComponent); component = fixture.componentInstance; fixture.detectChanges(); @@ -95,6 +120,8 @@ describe('ProjectAuthoringComponent', () => { moveSpecificStep(); deleteSpecificLesson(); moveSpecificLesson(); + addStep(); + addLesson(); }); function collapseAllButtonClicked() { @@ -217,3 +244,165 @@ function moveSpecificLesson() { }); }); } + +function addStep() { + addStepBefore(); + addStepBeforeFirstStepInLesson(); + addStepAfter(); +} + +function addStepBefore() { + describe('add step button is clicked on a step that is not the first step in a lesson', () => { + describe('add step before is chosen on the menu', () => { + it('adds a step before the chosen step', async () => { + const addStepButtons = await harness.getAddStepButtons(); + addStepButtons[1].click(); + const addStepMenu = await harness.getOpenedAddStepMenu(); + await addStepMenu.clickItem({ text: /Add Step Before/ }); + const newStep = await harness.getStep('1.2: New Step'); + expect(newStep).not.toEqual(null); + }); + }); + }); +} + +function addStepBeforeFirstStepInLesson() { + describe('add step button is clicked on a step that is the first step in a lesson', () => { + describe('add step before is chosen on the menu', () => { + it('adds a step before the chosen step', async () => { + const addStepButtons = await harness.getAddStepButtons(); + addStepButtons[0].click(); + const addStepMenu = await harness.getOpenedAddStepMenu(); + await addStepMenu.clickItem({ text: /Add Step Before/ }); + const newStep = await harness.getStep('1.1: New Step'); + expect(newStep).not.toEqual(null); + }); + }); + }); +} + +function addStepAfter() { + describe('add step button is clicked', () => { + describe('add step after is chosen on the menu', () => { + it('adds a step after the chosen step', async () => { + const addStepButtons = await harness.getAddStepButtons(); + addStepButtons[1].click(); + const addStepMenu = await harness.getOpenedAddStepMenu(); + await addStepMenu.clickItem({ text: /Add Step After/ }); + const newStep = await harness.getStep('1.3: New Step'); + expect(newStep).not.toEqual(null); + }); + }); + }); +} + +function addLesson() { + addLessonBefore(); + addLessonBeforeFirstLesson(); + addLessonAfter(); + addInactiveLessonBefore(); + addInactiveLessonBeforeFirstLesson(); + addInactiveLessonAfter(); +} + +function addLessonBeforeFirstLesson() { + describe('add lesson button is clicked on a lesson that is the first lesson', () => { + describe('add lesson before is chosen on the menu', () => { + it('adds a lesson before the chosen lesson', async () => { + const addLessonButtons = await harness.getAddLessonButtons(); + addLessonButtons[0].click(); + const addLessonMenu = await harness.getOpenedAddStepMenu(); + await addLessonMenu.clickItem({ text: addLessonBeforeRegex }); + const newLesson = await harness.getLesson('1: New Lesson'); + expect(newLesson).not.toEqual(null); + }); + }); + }); +} + +function addLessonBefore() { + describe('add lesson button is clicked on a lesson that is not the first lesson', () => { + describe('add lesson before is chosen on the menu', () => { + it('adds a lesson before the chosen lesson', async () => { + const addLessonButtons = await harness.getAddLessonButtons(); + addLessonButtons[1].click(); + const addLessonMenu = await harness.getOpenedAddStepMenu(); + await addLessonMenu.clickItem({ text: addLessonBeforeRegex }); + const newLesson = await harness.getLesson('2: New Lesson'); + expect(newLesson).not.toEqual(null); + }); + }); + }); +} + +function addLessonAfter() { + describe('add lesson button is clicked', () => { + describe('add lesson after is chosen on the menu', () => { + it('adds a lesson after the chosen lesson', async () => { + const addLessonButtons = await harness.getAddLessonButtons(); + addLessonButtons[0].click(); + const addLessonMenu = await harness.getOpenedAddStepMenu(); + await addLessonMenu.clickItem({ text: addLessonAfterRegex }); + const newLesson = await harness.getLesson('2: New Lesson'); + expect(newLesson).not.toEqual(null); + }); + }); + }); +} + +function addInactiveLessonBeforeFirstLesson() { + describe('add lesson button is clicked on an inactive lesson that is the first inactive lesson', () => { + describe('add lesson before is chosen on the menu', () => { + it('adds a lesson before the chosen lesson', async () => { + const addLessonButtons = await harness.getAddLessonButtons(); + addLessonButtons[5].click(); + const addLessonMenu = await harness.getOpenedAddStepMenu(); + await addLessonMenu.clickItem({ text: addLessonBeforeRegex }); + const unusedLessonTitles = await harness.getUnusedLessonTitles(); + expect(unusedLessonTitles).toEqual([ + 'New Lesson', + 'Inactive Lesson One', + 'Inactive Lesson Two' + ]); + }); + }); + }); +} + +function addInactiveLessonBefore() { + describe('add lesson button is clicked on an inactive lesson that is not the first inactive lesson', () => { + describe('add lesson before is chosen on the menu', () => { + it('adds a lesson before the chosen lesson', async () => { + const addLessonButtons = await harness.getAddLessonButtons(); + addLessonButtons[6].click(); + const addLessonMenu = await harness.getOpenedAddStepMenu(); + await addLessonMenu.clickItem({ text: addLessonBeforeRegex }); + const unusedLessonTitles = await harness.getUnusedLessonTitles(); + expect(unusedLessonTitles).toEqual([ + 'Inactive Lesson One', + 'New Lesson', + 'Inactive Lesson Two' + ]); + }); + }); + }); +} + +function addInactiveLessonAfter() { + describe('add lesson button is clicked next to an inactive lesson', () => { + describe('add lesson after is chosen on the menu', () => { + it('adds a lesson after the chosen lesson', async () => { + const addLessonButtons = await harness.getAddLessonButtons(); + addLessonButtons[6].click(); + const addLessonMenu = await harness.getOpenedAddStepMenu(); + await addLessonMenu.clickItem({ text: addLessonAfterRegex }); + const unusedLessonTitles = await harness.getUnusedLessonTitles(); + expect(unusedLessonTitles).toEqual([ + 'Inactive Lesson One', + 'Inactive Lesson Two', + 'New Lesson' + ]); + }); + }); + }); +} diff --git a/src/assets/wise5/authoringTool/project-authoring/project-authoring.harness.ts b/src/assets/wise5/authoringTool/project-authoring/project-authoring.harness.ts index 4f0a59c5a5d..8e7d8a6378f 100644 --- a/src/assets/wise5/authoringTool/project-authoring/project-authoring.harness.ts +++ b/src/assets/wise5/authoringTool/project-authoring/project-authoring.harness.ts @@ -1,10 +1,18 @@ import { ComponentHarness } from '@angular/cdk/testing'; import { MatButtonHarness } from '@angular/material/button/testing'; +import { MatMenuHarness } from '@angular/material/menu/testing'; import { ProjectAuthoringLessonHarness } from '../project-authoring-lesson/project-authoring-lesson.harness'; import { ProjectAuthoringStepHarness } from '../project-authoring-step/project-authoring-step.harness'; export class ProjectAuthoringHarness extends ComponentHarness { static hostSelector = 'project-authoring'; + getAddLessonButtons = this.locatorForAll( + MatButtonHarness.with({ selector: '[matTooltip="Add lesson"]' }) + ); + getAddStepButtons = this.locatorForAll( + MatButtonHarness.with({ selector: '[matTooltip="Add step"]' }) + ); + getAddStepMenus = this.locatorForAll(MatMenuHarness); getCollapseAllButton = this.locatorFor(MatButtonHarness.with({ text: '- Collapse All' })); getExpandAllButton = this.locatorFor(MatButtonHarness.with({ text: '+ Expand All' })); getLessons = this.locatorForAll(ProjectAuthoringLessonHarness); @@ -14,7 +22,29 @@ export class ProjectAuthoringHarness extends ComponentHarness { return this.locatorForOptional(ProjectAuthoringLessonHarness.with({ title: title }))(); } + getUnusedLessons(): Promise { + return this.locatorForAll(ProjectAuthoringLessonHarness.with({ title: /^(?!\d*: ).*/ }))(); + } + + async getUnusedLessonTitles(): Promise { + const unusedLessonTitles = []; + for (const unusedLesson of await this.getUnusedLessons()) { + unusedLessonTitles.push(await unusedLesson.getTitle()); + } + return unusedLessonTitles; + } + getStep(title: string): Promise { return this.locatorForOptional(ProjectAuthoringStepHarness.with({ title: title }))(); } + + async getOpenedAddStepMenu(): Promise { + const addStepMenus = await this.getAddStepMenus(); + for (const menu of addStepMenus) { + if (await menu.isOpen()) { + return menu; + } + } + return null; + } } diff --git a/src/assets/wise5/common/dom/dom.ts b/src/assets/wise5/common/dom/dom.ts index 03e8b4ba8bb..cf7406a1262 100644 --- a/src/assets/wise5/common/dom/dom.ts +++ b/src/assets/wise5/common/dom/dom.ts @@ -25,8 +25,7 @@ export function temporarilyHighlightElement(id: string, duration: number = 1000) */ setTimeout(() => { element.css({ - transition: '', - 'background-color': '' + transition: '' }); }, 2000); }, duration); diff --git a/src/assets/wise5/services/projectService.ts b/src/assets/wise5/services/projectService.ts index 83ff6f4f08d..107b2584128 100644 --- a/src/assets/wise5/services/projectService.ts +++ b/src/assets/wise5/services/projectService.ts @@ -2002,4 +2002,34 @@ export class ProjectService { getSpeechToTextSettings(): any { return this.project.speechToText; } + + getPreviousNodeId(nodeId: string): string { + if (this.isActive(nodeId)) { + const parentGroup = this.getParentGroup(nodeId); + const childIds = parentGroup.ids; + return childIds[childIds.indexOf(nodeId) - 1]; + } else { + const inactiveGroupNodes = this.getInactiveGroupNodes(); + for (let i = 0; i < inactiveGroupNodes.length; i++) { + if (inactiveGroupNodes[i].id === nodeId) { + return inactiveGroupNodes[i - 1]?.id; + } + } + } + return null; + } + + isFirstStepInLesson(nodeId: string): boolean { + for (const lesson of this.getGroupNodes()) { + if (lesson.startId === nodeId) { + return true; + } + } + for (const inactiveLesson of this.getInactiveGroupNodes()) { + if (inactiveLesson.startId === nodeId) { + return true; + } + } + return false; + } } diff --git a/src/assets/wise5/services/teacherProjectService.ts b/src/assets/wise5/services/teacherProjectService.ts index 7d7c35dcdba..6344e08bd68 100644 --- a/src/assets/wise5/services/teacherProjectService.ts +++ b/src/assets/wise5/services/teacherProjectService.ts @@ -2959,7 +2959,7 @@ export class TeacherProjectService extends ProjectService { */ isFirstNodeInBranchPath(nodeId) { for (const node of this.getNodes()) { - if (node.transitionLogic != null && node.transitionLogic.transitions != null) { + if (node.transitionLogic?.transitions?.length > 1) { for (const transition of node.transitionLogic.transitions) { if (transition.to === nodeId) { return true; diff --git a/src/messages.xlf b/src/messages.xlf index 01c2f2f5edb..a2f47ffd28d 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -9092,6 +9092,34 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.69 + + Add lesson + + src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.html + 7 + + + + Add Lesson Before + + src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.html + 15 + + + + Add Lesson After + + src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.html + 18 + + + + New Lesson + + src/assets/wise5/authoringTool/add-lesson-button/add-lesson-button.component.ts + 51 + + Enter a title for the new unit @@ -9189,7 +9217,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 89 + 99 @@ -9752,10 +9780,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/assets/wise5/authoringTool/choose-node-location/choose-move-node-location/choose-move-node-location.component.html 41 - - src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 90 - Unused Steps @@ -9769,7 +9793,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 102 + 120 @@ -9782,10 +9806,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/assets/wise5/authoringTool/choose-node-location/choose-move-node-location/choose-move-node-location.component.html 81 - - src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html - 103 - Insert after @@ -12214,11 +12234,43 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.49 + + Add step + + src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.html + 84 + + + src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.html + 110 + + + + add_circleAdd Step Before + + src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.html + 97,98 + + + + add_circleAdd Step After + + src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.html + 100,101 + + + + This lesson has no steps + + src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.html + 105 + + Are you sure you want to delete this lesson? src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.ts - 60 + 61 @@ -12323,6 +12375,27 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.73,75 + + There are no lessons + + src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html + 79 + + + + There are no unused lessons + + src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html + 101 + + + + There are no unused steps + + src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html + 121 + + Are you sure you want to delete the selected item? @@ -14264,6 +14337,10 @@ Are you sure you want to proceed? src/assets/wise5/classroomMonitor/dataExport/export-raw-data/export-raw-data.component.html 16 + + src/assets/wise5/classroomMonitor/dataExport/export-raw-data/export-raw-data.component.html + 16 + Include Student Work