diff --git a/src/app/curriculum/curriculum.component.spec.ts b/src/app/curriculum/curriculum.component.spec.ts index 6593c020dc7..4c554ff032b 100644 --- a/src/app/curriculum/curriculum.component.spec.ts +++ b/src/app/curriculum/curriculum.component.spec.ts @@ -23,7 +23,6 @@ describe('CurriculumComponent', () => { providers: [ MockProviders(ConfigService, UserService), MockProvider(LibraryService, { - filterValuesUpdated$: of(), communityLibraryProjectsSource$: of([]), numberOfPublicProjectsVisible$: of(3), numberOfPersonalProjectsVisible$: of(2) diff --git a/src/app/curriculum/curriculum.component.ts b/src/app/curriculum/curriculum.component.ts index 03f41e9f68f..341e9684b4d 100644 --- a/src/app/curriculum/curriculum.component.ts +++ b/src/app/curriculum/curriculum.component.ts @@ -11,6 +11,7 @@ import { Subscription } from 'rxjs'; import { UserService } from '../services/user.service'; import { MatButtonModule } from '@angular/material/button'; import { Router, RouterModule } from '@angular/router'; +import { ProjectFilterValues } from '../domain/projectFilterValues'; @Component({ imports: [ @@ -23,6 +24,7 @@ import { Router, RouterModule } from '@angular/router'; PublicLibraryComponent, RouterModule ], + providers: [ProjectFilterValues], styleUrl: './curriculum.component.scss', templateUrl: './curriculum.component.html' }) @@ -41,7 +43,6 @@ export class CurriculumComponent { ngOnInit(): void { this.showMyUnits = this.userService.isTeacher(); - this.libraryService.initFilterValues(); this.getLibraryProjects(); this.subscribeNumUnitsVisible(); } diff --git a/src/app/domain/projectFilterValues.ts b/src/app/domain/projectFilterValues.ts index 65ba0ee129c..49434eb6659 100644 --- a/src/app/domain/projectFilterValues.ts +++ b/src/app/domain/projectFilterValues.ts @@ -1,3 +1,4 @@ +import { Subject } from 'rxjs'; import { LibraryProject } from '../modules/library/libraryProject'; export class ProjectFilterValues { @@ -9,6 +10,8 @@ export class ProjectFilterValues { searchValue: string = ''; standardValue: string[] = []; unitTypeValue: string[] = []; + private updatedSource = new Subject(); + public updated$ = this.updatedSource.asObservable(); matches(project: LibraryProject): boolean { return ( @@ -57,11 +60,13 @@ export class ProjectFilterValues { } clear(): void { - this.standardValue = []; this.disciplineValue = []; - this.unitTypeValue = []; - this.gradeLevelValue = []; this.featureValue = []; + this.gradeLevelValue = []; + this.publicUnitTypeValue = []; + this.searchValue = ''; + this.standardValue = []; + this.unitTypeValue = []; } private matchesUnitType(project: LibraryProject): boolean { @@ -114,4 +119,8 @@ export class ProjectFilterValues { ) ); } + + emitUpdated(): void { + this.updatedSource.next(); + } } diff --git a/src/app/modules/library/home-page-project-library/home-page-project-library.component.ts b/src/app/modules/library/home-page-project-library/home-page-project-library.component.ts index 6545594a939..b9384d0c715 100644 --- a/src/app/modules/library/home-page-project-library/home-page-project-library.component.ts +++ b/src/app/modules/library/home-page-project-library/home-page-project-library.component.ts @@ -3,14 +3,13 @@ import { LibraryService } from '../../../services/library.service'; import { ProjectFilterValues } from '../../../domain/projectFilterValues'; @Component({ + providers: [ProjectFilterValues], selector: 'app-home-page-project-library', styleUrls: ['./home-page-project-library.component.scss', '../library/library.component.scss'], templateUrl: './home-page-project-library.component.html', standalone: false }) export class HomePageProjectLibraryComponent { - protected filterValues: ProjectFilterValues = new ProjectFilterValues(); - constructor(private libraryService: LibraryService) { libraryService.getOfficialLibraryProjects(); } diff --git a/src/app/modules/library/library-filters/library-filters.component.html b/src/app/modules/library/library-filters/library-filters.component.html index 33c73c71c17..52a9022624b 100644 --- a/src/app/modules/library/library-filters/library-filters.component.html +++ b/src/app/modules/library/library-filters/library-filters.component.html @@ -1,7 +1,7 @@
- +
}
diff --git a/src/app/modules/library/library/library.component.ts b/src/app/modules/library/library/library.component.ts index 9a33be3f48f..c7ef3198240 100644 --- a/src/app/modules/library/library/library.component.ts +++ b/src/app/modules/library/library/library.component.ts @@ -18,16 +18,17 @@ export abstract class LibraryComponent implements OnInit { protected showFilters: boolean = false; protected subscriptions: Subscription = new Subscription(); - constructor(protected libraryService: LibraryService) {} + constructor( + protected filterValues: ProjectFilterValues, + protected libraryService: LibraryService + ) {} ngOnInit(): void { - this.subscriptions.add( - this.libraryService.filterValuesUpdated$.subscribe(() => this.filterUpdated()) - ); + this.subscriptions.add(this.filterValues.updated$.subscribe(() => this.filterUpdated())); } ngOnDestroy(): void { - this.getFilterValues().clear(); + this.filterValues.clear(); this.subscriptions.unsubscribe(); } @@ -59,7 +60,7 @@ export abstract class LibraryComponent implements OnInit { protected filterUpdated(): void { this.filteredProjects = this.projects .map((project) => { - project.visible = this.getFilterValues().matches(project); + project.visible = this.filterValues.matches(project); return project; }) .filter((project) => project.visible) @@ -82,8 +83,4 @@ export abstract class LibraryComponent implements OnInit { protected countVisibleProjects(projects: LibraryProject[]): number { return projects.filter((project) => project.visible).length; } - - private getFilterValues(): ProjectFilterValues { - return this.libraryService.filterValues; - } } diff --git a/src/app/modules/library/official-library/official-library.component.spec.ts b/src/app/modules/library/official-library/official-library.component.spec.ts index 682205bb0ba..66c4481ee3c 100644 --- a/src/app/modules/library/official-library/official-library.component.spec.ts +++ b/src/app/modules/library/official-library/official-library.component.spec.ts @@ -11,11 +11,9 @@ import { ProjectFilterValues } from '../../../domain/projectFilterValues'; export class MockLibraryService { libraryGroupsSource$ = fakeAsyncResponse({}); officialLibraryProjectsSource$ = fakeAsyncResponse([]); - filterValuesUpdated$ = of(); implementationModelOptions: LibraryGroup[] = []; numberOfPublicProjectsVisible = new BehaviorSubject(0); getOfficialLibraryProjects() {} - filterValues = new ProjectFilterValues(); } describe('OfficialLibraryComponent', () => { @@ -25,7 +23,7 @@ describe('OfficialLibraryComponent', () => { TestBed.configureTestingModule({ imports: [OverlayModule], declarations: [OfficialLibraryComponent], - providers: [{ provide: LibraryService, useClass: MockLibraryService }], + providers: [{ provide: LibraryService, useClass: MockLibraryService }, ProjectFilterValues], schemas: [NO_ERRORS_SCHEMA] }).compileComponents(); })); diff --git a/src/app/modules/library/official-library/official-library.component.ts b/src/app/modules/library/official-library/official-library.component.ts index cf244ba975f..79d8857c5d3 100644 --- a/src/app/modules/library/official-library/official-library.component.ts +++ b/src/app/modules/library/official-library/official-library.component.ts @@ -2,7 +2,6 @@ import { BehaviorSubject } from 'rxjs'; import { Component, Input, ViewEncapsulation } from '@angular/core'; import { LibraryGroup } from '../libraryGroup'; import { LibraryProject } from '../libraryProject'; -import { LibraryService } from '../../../services/library.service'; import { LibraryComponent } from '../library/library.component'; @Component({ @@ -19,10 +18,6 @@ export class OfficialLibraryComponent extends LibraryComponent { libraryGroups: LibraryGroup[] = []; expandedGroups: object = {}; - constructor(protected libraryService: LibraryService) { - super(libraryService); - } - ngOnInit() { super.ngOnInit(); this.subscriptions.add( diff --git a/src/app/modules/library/personal-library/personal-library.component.spec.ts b/src/app/modules/library/personal-library/personal-library.component.spec.ts index dddebebd96a..5e58fe7168d 100644 --- a/src/app/modules/library/personal-library/personal-library.component.spec.ts +++ b/src/app/modules/library/personal-library/personal-library.component.spec.ts @@ -10,6 +10,7 @@ import { of } from 'rxjs'; import { PersonalLibraryComponent } from './personal-library.component'; import { PersonalLibraryHarness } from './personal-library.harness'; import { ProjectTagService } from '../../../../assets/wise5/services/projectTagService'; +import { ProjectFilterValues } from '../../../domain/projectFilterValues'; import { provideHttpClientTesting } from '@angular/common/http/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; @@ -32,6 +33,7 @@ describe('PersonalLibraryComponent', () => { providers: [ ArchiveProjectService, LibraryService, + ProjectFilterValues, ProjectTagService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting() diff --git a/src/app/modules/library/personal-library/personal-library.component.ts b/src/app/modules/library/personal-library/personal-library.component.ts index f977f00d6ca..6fe101b03b3 100644 --- a/src/app/modules/library/personal-library/personal-library.component.ts +++ b/src/app/modules/library/personal-library/personal-library.component.ts @@ -18,6 +18,7 @@ import { ProjectSelectionEvent } from '../../../domain/projectSelectionEvent'; import { SelectAllItemsCheckboxComponent } from '../select-all-items-checkbox/select-all-items-checkbox.component'; import { SelectTagsComponent } from '../../../teacher/select-tags/select-tags.component'; import { Tag } from '../../../domain/tag'; +import { ProjectFilterValues } from '../../../domain/projectFilterValues'; @Component({ imports: [ @@ -57,9 +58,10 @@ export class PersonalLibraryComponent extends LibraryComponent { constructor( private archiveProjectService: ArchiveProjectService, + protected filterValues: ProjectFilterValues, protected libraryService: LibraryService ) { - super(libraryService); + super(filterValues, libraryService); } ngOnInit(): void { diff --git a/src/app/modules/library/public-library/public-library.component.spec.ts b/src/app/modules/library/public-library/public-library.component.spec.ts index a52fd7330a1..06a7acafadd 100644 --- a/src/app/modules/library/public-library/public-library.component.spec.ts +++ b/src/app/modules/library/public-library/public-library.component.spec.ts @@ -3,8 +3,8 @@ import { PublicLibraryComponent } from './public-library.component'; import { MockProvider } from 'ng-mocks'; import { LibraryService } from '../../../services/library.service'; import { of } from 'rxjs'; -import { ProjectFilterValues } from '../../../domain/projectFilterValues'; import { LibraryProject } from '../libraryProject'; +import { ProjectFilterValues } from '../../../domain/projectFilterValues'; describe('PublicLibraryComponent', () => { let component: PublicLibraryComponent; @@ -15,7 +15,6 @@ describe('PublicLibraryComponent', () => { imports: [PublicLibraryComponent], providers: [ MockProvider(LibraryService, { - filterValuesUpdated$: of(), communityLibraryProjectsSource$: of([ { id: 1, name: 'P1' }, { id: 2, name: 'P2' } @@ -23,9 +22,9 @@ describe('PublicLibraryComponent', () => { officialLibraryProjectsSource$: of([ { id: 1, name: 'P1' }, { id: 3, name: 'P3' } - ] as LibraryProject[]), - filterValues: new ProjectFilterValues() - }) + ] as LibraryProject[]) + }), + ProjectFilterValues ] }).compileComponents(); diff --git a/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.spec.ts b/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.spec.ts index 3be0149b88f..adfabcd6228 100644 --- a/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.spec.ts +++ b/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.spec.ts @@ -5,8 +5,6 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { ProjectFilterValues } from '../../../domain/projectFilterValues'; import { MatCheckboxHarness } from '@angular/material/checkbox/testing'; import { MatDialog } from '@angular/material/dialog'; -import { LibraryService } from '../../../services/library.service'; -import { MockProvider } from 'ng-mocks'; describe('PublicUnitTypeSelectorComponent', () => { let component: PublicUnitTypeSelectorComponent; @@ -17,11 +15,7 @@ describe('PublicUnitTypeSelectorComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ imports: [PublicUnitTypeSelectorComponent], - providers: [ - MockProvider(LibraryService, { - filterValues: new ProjectFilterValues() - }) - ] + providers: [ProjectFilterValues] }).compileComponents(); fixture = TestBed.createComponent(PublicUnitTypeSelectorComponent); @@ -40,7 +34,7 @@ describe('PublicUnitTypeSelectorComponent', () => { it('should update filterValues and emit event when checkbox is clicked', async () => { const spy = spyOn(component.publicUnitTypeUpdatedEvent, 'emit'); await checkbox1.check(); - expect(TestBed.inject(LibraryService).filterValues.publicUnitTypeValue).toEqual(['wiseTested']); + expect(TestBed.inject(ProjectFilterValues).publicUnitTypeValue).toEqual(['wiseTested']); expect(spy).toHaveBeenCalled(); }); diff --git a/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.ts b/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.ts index 064f196ec73..29789e1485f 100644 --- a/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.ts +++ b/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.ts @@ -12,7 +12,6 @@ import { } from '@angular/material/dialog'; import { RouterLink } from '@angular/router'; import { MatIconModule } from '@angular/material/icon'; -import { LibraryService } from '../../../services/library.service'; @Component({ imports: [FormsModule, MatCheckboxModule, MatIconModule], @@ -28,20 +27,15 @@ import { LibraryService } from '../../../services/library.service'; }) export class PublicUnitTypeSelectorComponent { protected communityBuilt: boolean; - protected filterValues: ProjectFilterValues; @Output() publicUnitTypeUpdatedEvent: EventEmitter = new EventEmitter(); protected wiseTested: boolean; constructor( private dialog: MatDialog, - private libraryService: LibraryService + private filterValues: ProjectFilterValues ) {} - ngOnInit(): void { - this.filterValues = this.libraryService.filterValues; - } - protected updatePublicUnitType(): void { this.filterValues.publicUnitTypeValue = []; if (this.wiseTested) { diff --git a/src/app/services/library.service.ts b/src/app/services/library.service.ts index 668f4e3be87..f2796bb7706 100644 --- a/src/app/services/library.service.ts +++ b/src/app/services/library.service.ts @@ -3,7 +3,6 @@ import { Observable, BehaviorSubject, Subject } from 'rxjs'; import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; import { LibraryGroup } from '../modules/library/libraryGroup'; import { LibraryProject } from '../modules/library/libraryProject'; -import { ProjectFilterValues } from '../domain/projectFilterValues'; import { Project } from '../domain/project'; import { Router } from '@angular/router'; @@ -11,9 +10,6 @@ import { Router } from '@angular/router'; export class LibraryService { private libraryGroupsUrl = '/api/project/library'; private communityProjectsUrl = '/api/project/community'; - public filterValues: ProjectFilterValues = new ProjectFilterValues(); - private filterValuesUpdatedSource = new Subject(); - public filterValuesUpdated$ = this.filterValuesUpdatedSource.asObservable(); private personalProjectsUrl = '/api/project/personal'; private sharedProjectsUrl = '/api/project/shared'; private copyProjectUrl = '/api/project/copy'; @@ -129,10 +125,6 @@ export class LibraryService { return this.http.post(this.copyProjectUrl, body, { headers: headers }); } - filterValuesUpdated(): void { - this.filterValuesUpdatedSource.next(); - } - addPersonalLibraryProject(project: LibraryProject) { this.newProjectSource.next(project); this.router.navigate(['/curriculum/personal'], { state: { newProjectId: project.id } }); @@ -156,10 +148,5 @@ export class LibraryService { this.communityLibraryProjectsSource.next([]); this.personalLibraryProjectsSource.next([]); this.sharedLibraryProjectsSource.next([]); - this.filterValuesUpdatedSource.next(); - } - - initFilterValues(): void { - this.filterValues = new ProjectFilterValues(); } } diff --git a/src/app/teacher/authoring-tool.module.ts b/src/app/teacher/authoring-tool.module.ts index 32f1f2ba86f..586c98ddc2b 100644 --- a/src/app/teacher/authoring-tool.module.ts +++ b/src/app/teacher/authoring-tool.module.ts @@ -21,7 +21,6 @@ import { WiseTinymceEditorModule } from '../../assets/wise5/directives/wise-tiny import { NotebookAuthoringComponent } from '../../assets/wise5/authoringTool/notebook-authoring/notebook-authoring.component'; import { StructureAuthoringModule } from '../../assets/wise5/authoringTool/structure/structure-authoring.module'; import { MilestonesAuthoringComponent } from '../../assets/wise5/authoringTool/milestones-authoring/milestones-authoring.component'; -import { TopBarComponent } from '../../assets/wise5/authoringTool/components/top-bar/top-bar.component'; import { ProjectAssetAuthoringModule } from '../../assets/wise5/authoringTool/project-asset-authoring/project-asset-authoring.module'; import { ChooseSimulationComponent } from '../../assets/wise5/authoringTool/addNode/choose-simulation/choose-simulation.component'; import { ProjectInfoAuthoringComponent } from '../../assets/wise5/authoringTool/project-info-authoring/project-info-authoring.component'; @@ -30,7 +29,6 @@ import { ConfigureAutomatedAssessmentComponent } from '../../assets/wise5/author import { ProjectListComponent } from '../../assets/wise5/authoringTool/project-list/project-list.component'; import { AddProjectComponent } from '../../assets/wise5/authoringTool/add-project/add-project.component'; import { MatBadgeModule } from '@angular/material/badge'; -import { AuthoringToolBarComponent } from '../../assets/wise5/authoringTool/components/shared/authoring-tool-bar/authoring-tool-bar.component'; import { ProjectAuthoringComponent } from '../../assets/wise5/authoringTool/project-authoring/project-authoring.component'; import { AuthoringToolComponent } from '../../assets/wise5/authoringTool/authoring-tool.component'; import { ChooseMoveNodeLocationComponent } from '../../assets/wise5/authoringTool/choose-node-location/choose-move-node-location/choose-move-node-location.component'; @@ -58,8 +56,6 @@ import { EditBranchComponent } from '../../assets/wise5/authoringTool/edit-branc import { ComponentTypeButtonComponent } from '../../assets/wise5/authoringTool/components/component-type-button/component-type-button.component'; import { MatExpansionModule } from '@angular/material/expansion'; import { AddComponentComponent } from '../../assets/wise5/authoringTool/node/add-component/add-component.component'; -import { SideMenuComponent } from '../../assets/wise5/common/side-menu/side-menu.component'; -import { MainMenuComponent } from '../../assets/wise5/common/main-menu/main-menu.component'; import { ChooseImportComponentComponent } from '../../assets/wise5/authoringTool/importComponent/choose-import-component/choose-import-component.component'; import { EditUnitResourcesComponent } from '../../assets/wise5/authoringTool/edit-unit-resources/edit-unit-resources.component'; import { EditUnitTypeComponent } from '../../assets/wise5/authoringTool/edit-unit-type/edit-unit-type.component'; @@ -67,7 +63,6 @@ import { EditUnitTypeComponent } from '../../assets/wise5/authoringTool/edit-uni @NgModule({ declarations: [ AdvancedProjectAuthoringComponent, - AuthoringToolComponent, ChooseMoveNodeLocationComponent, ConcurrentAuthorsMessageComponent, ConfigureAutomatedAssessmentComponent, @@ -92,7 +87,7 @@ import { EditUnitTypeComponent } from '../../assets/wise5/authoringTool/edit-uni AddProjectComponent, AddStepButtonComponent, AddYourOwnNodeComponent, - AuthoringToolBarComponent, + AuthoringToolComponent, ChooseAutomatedAssessmentComponent, ChooseCopyNodeLocationComponent, ChooseImportComponentComponent, @@ -115,7 +110,6 @@ import { EditUnitTypeComponent } from '../../assets/wise5/authoringTool/edit-uni MatExpansionModule, InsertNodeAfterButtonComponent, InsertNodeInsideButtonComponent, - MainMenuComponent, NgSelectModule, NodeAdvancedAuthoringModule, NodeIconAndTitleComponent, @@ -123,11 +117,9 @@ import { EditUnitTypeComponent } from '../../assets/wise5/authoringTool/edit-uni ProjectAssetAuthoringModule, ProjectListComponent, RouterModule, - SideMenuComponent, StructureAuthoringModule, StudentTeacherCommonModule, TeacherNodeIconComponent, - TopBarComponent, TranslatableInputComponent, TranslatableRichTextEditorComponent, TranslatableTextareaComponent, diff --git a/src/app/teacher/component-authoring.module.ts b/src/app/teacher/component-authoring.module.ts index 86d89d2dcb6..b352208d64c 100644 --- a/src/app/teacher/component-authoring.module.ts +++ b/src/app/teacher/component-authoring.module.ts @@ -90,6 +90,7 @@ import { AiChatAuthoringComponent } from '../../assets/wise5/components/aiChat/a import { EditAiChatAdvancedComponent } from '../../assets/wise5/components/aiChat/edit-ai-chat-advanced/edit-ai-chat-advanced.component'; import { RequiredErrorLabelComponent } from '../../assets/wise5/authoringTool/node/advanced/required-error-label/required-error-label.component'; import { EditCRaterInfoComponent } from '../../assets/wise5/components/common/cRater/edit-crater-info/edit-crater-info.component'; +import { EditCRaterIdeaDescriptionsComponent } from '../../assets/wise5/components/common/cRater/edit-crater-idea-descriptions/edit-crater-idea-descriptions.component'; @NgModule({ declarations: [ @@ -173,6 +174,7 @@ import { EditCRaterInfoComponent } from '../../assets/wise5/components/common/cR EditComponentConstraintsComponent, EditComponentPrompt, EditComponentWidthComponent, + EditCRaterIdeaDescriptionsComponent, EditCRaterInfoComponent, MatchAuthoringComponent, MultipleChoiceAuthoring, @@ -221,6 +223,7 @@ import { EditCRaterInfoComponent } from '../../assets/wise5/components/common/cR EditConnectedComponentsWithBackgroundComponent, EditConnectedComponentDeleteButtonComponent, EditConnectedComponentTypeSelectComponent, + EditCRaterIdeaDescriptionsComponent, EditCRaterInfoComponent, EditDialogGuidanceAdvancedComponent, EditDiscussionAdvancedComponent, diff --git a/src/app/teacher/create-run-dialog/create-run-dialog.component.spec.ts b/src/app/teacher/create-run-dialog/create-run-dialog.component.spec.ts index 6b8f450812a..1a04d0b61d9 100644 --- a/src/app/teacher/create-run-dialog/create-run-dialog.component.spec.ts +++ b/src/app/teacher/create-run-dialog/create-run-dialog.component.spec.ts @@ -3,14 +3,10 @@ import { TeacherService } from '../teacher.service'; import { CreateRunDialogComponent } from './create-run-dialog.component'; import { MatDialogRef, MatDialog } from '@angular/material/dialog'; import { MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatRadioModule } from '@angular/material/radio'; -import { ReactiveFormsModule } from '@angular/forms'; import { Observable } from 'rxjs'; import { of } from 'rxjs'; import { Project } from '../../domain/project'; import { Run } from '../../domain/run'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; import { By } from '@angular/platform-browser'; import { Course } from '../../domain/course'; import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject'; @@ -40,7 +36,7 @@ export class MockTeacherService { const courses: Course[] = []; const course = new Course({ id: '1', name: 'Test' }); courses.push(course); - return Observable.create((observer) => { + return new Observable((observer) => { observer.next(courses); observer.complete(); }); @@ -106,24 +102,22 @@ describe('CreateRunDialogComponent', () => { { provide: MatDialogRef, useValue: { - afterClosed: () => { - return Observable.create((observer) => { + afterClosed: () => + new Observable((observer) => { observer.next({}); observer.complete(); - }); - }, + }), close: () => {} } }, { provide: MAT_DIALOG_DATA, useValue: { project: project } }, { provide: Router, useClass: MockRouter } - ], - schemas: [NO_ERRORS_SCHEMA] + ] }); fixture = TestBed.createComponent(CreateRunDialogComponent); component = fixture.componentInstance; component.project = project; - component.dialog = TestBed.get(MatDialog); + component.dialog = TestBed.inject(MatDialog); spyOn(component.dialog, 'closeAll').and.callThrough(); fixture.detectChanges(); }); diff --git a/src/app/teacher/create-run-dialog/create-run-dialog.component.ts b/src/app/teacher/create-run-dialog/create-run-dialog.component.ts index c319c9c31d7..beaa061d1e1 100644 --- a/src/app/teacher/create-run-dialog/create-run-dialog.component.ts +++ b/src/app/teacher/create-run-dialog/create-run-dialog.component.ts @@ -23,7 +23,6 @@ import { provideNativeDateAdapter } from '@angular/material/core'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatCardModule } from '@angular/material/card'; import { Router } from '@angular/router'; import { finalize } from 'rxjs/operators'; @@ -35,6 +34,7 @@ import { ListClassroomCoursesDialogComponent } from '../list-classroom-courses-d import { TeacherRun } from '../teacher-run'; import { MatDividerModule } from '@angular/material/divider'; import { MatRadioModule } from '@angular/material/radio'; +import { MatProgressBarModule } from '@angular/material/progress-bar'; @Component({ imports: [ @@ -51,7 +51,7 @@ import { MatRadioModule } from '@angular/material/radio'; MatRadioModule, MatTooltipModule, MatFormFieldModule, - MatProgressSpinnerModule, + MatProgressBarModule, MatCardModule ], providers: [provideNativeDateAdapter()], diff --git a/src/app/teacher/teacher-home/teacher-home.component.spec.ts b/src/app/teacher/teacher-home/teacher-home.component.spec.ts index efc581f6506..d25d8cb4ef0 100644 --- a/src/app/teacher/teacher-home/teacher-home.component.spec.ts +++ b/src/app/teacher/teacher-home/teacher-home.component.spec.ts @@ -6,11 +6,10 @@ import { User } from '../../domain/user'; import { Project } from '../../domain/project'; import { TeacherHomeComponent } from './teacher-home.component'; import { Run } from '../../domain/run'; -import { NO_ERRORS_SCHEMA, Component } from '@angular/core'; +import { NO_ERRORS_SCHEMA } from '@angular/core'; import { ConfigService } from '../../services/config.service'; import { Config } from '../../domain/config'; -import { LibraryService } from '../../services/library.service'; -import { RouterTestingModule } from '@angular/router/testing'; +import { provideRouter } from '@angular/router'; export function fakeAsyncResponse(data: T) { return defer(() => Promise.resolve(data)); @@ -39,7 +38,7 @@ export class MockTeacherService { run2.project = project2; runs.push(run1); runs.push(run2); - return Observable.create((observer) => { + return new Observable((observer) => { observer.next(runs); observer.complete(); }); @@ -65,8 +64,8 @@ export class MockUserService { user.roles = ['teacher']; user.username = 'DemoTeacher'; user.id = 123456; - return Observable.create((observer) => { - observer.next(user); + return new Observable((observer) => { + observer.next([user]); observer.complete(); }); } @@ -74,7 +73,7 @@ export class MockUserService { export class MockConfigService { getConfig(): Observable { - return Observable.create((observer) => { + return new Observable((observer) => { const config: Config = { contextPath: '/wise', logOutURL: '/logout', @@ -98,29 +97,22 @@ export class MockConfigService { } } -export class MockLibraryService { - clearAll(): void {} -} - describe('TeacherHomeComponent', () => { let component: TeacherHomeComponent; let fixture: ComponentFixture; - beforeEach( - waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [TeacherHomeComponent], - imports: [RouterTestingModule], - providers: [ - { provide: TeacherService, useClass: MockTeacherService }, - { provide: UserService, useClass: MockUserService }, - { provide: ConfigService, useClass: MockConfigService }, - { provide: LibraryService, useClass: MockLibraryService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); - }) - ); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [TeacherHomeComponent], + providers: [ + { provide: TeacherService, useClass: MockTeacherService }, + { provide: UserService, useClass: MockUserService }, + { provide: ConfigService, useClass: MockConfigService }, + provideRouter([]) + ], + schemas: [NO_ERRORS_SCHEMA] + }).compileComponents(); + })); beforeEach(() => { fixture = TestBed.createComponent(TeacherHomeComponent); diff --git a/src/app/teacher/teacher-home/teacher-home.component.ts b/src/app/teacher/teacher-home/teacher-home.component.ts index 0e91b68aec7..74b40a5be0b 100644 --- a/src/app/teacher/teacher-home/teacher-home.component.ts +++ b/src/app/teacher/teacher-home/teacher-home.component.ts @@ -3,14 +3,13 @@ import { UserService } from '../../services/user.service'; import { User } from '../../domain/user'; import { ConfigService } from '../../services/config.service'; import { MatTabGroup } from '@angular/material/tabs'; -import { LibraryService } from '../../services/library.service'; import { Router } from '@angular/router'; @Component({ - selector: 'app-teacher-home', - templateUrl: './teacher-home.component.html', - styleUrls: ['./teacher-home.component.scss'], - standalone: false + selector: 'app-teacher-home', + templateUrl: './teacher-home.component.html', + styleUrls: ['./teacher-home.component.scss'], + standalone: false }) export class TeacherHomeComponent implements OnInit { @ViewChild('tabs', { static: true }) tabs: MatTabGroup; @@ -26,7 +25,6 @@ export class TeacherHomeComponent implements OnInit { constructor( private userService: UserService, private configService: ConfigService, - private libraryService: LibraryService, private router: Router ) {} @@ -40,10 +38,6 @@ export class TeacherHomeComponent implements OnInit { }); } - ngOnDestroy() { - this.libraryService.clearAll(); - } - getUser() { this.userService.getUser().subscribe((user) => { this.user = user; diff --git a/src/app/teacher/teacher-tools-routing.module.ts b/src/app/teacher/teacher-tools-routing.module.ts index 49b59eb22ff..1f7761f8f85 100644 --- a/src/app/teacher/teacher-tools-routing.module.ts +++ b/src/app/teacher/teacher-tools-routing.module.ts @@ -1,4 +1,4 @@ -import { inject, NgModule } from '@angular/core'; +import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { ClassroomMonitorComponent } from '../../assets/wise5/classroomMonitor/classroom-monitor.component'; import { TeacherToolsResolver } from './teacher-tools.resolver'; @@ -17,7 +17,6 @@ import { ExportEventsComponent } from '../../assets/wise5/classroomMonitor/dataE import { ExportOneWorkgroupPerRowComponent } from '../../assets/wise5/classroomMonitor/dataExport/export-one-workgroup-per-row/export-one-workgroup-per-row.component'; import { ExportStudentWorkComponent } from '../../assets/wise5/classroomMonitor/dataExport/export-student-work/export-student-work.component'; import { NodeGradingComponent } from '../../assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component'; -import { TeacherProjectService } from '../../assets/wise5/services/teacherProjectService'; const routes: Routes = [ { @@ -38,18 +37,6 @@ const routes: Routes = [ { path: 'group/:nodeId', component: NodeProgressViewComponent }, { path: 'node/:nodeId', - pathMatch: 'full', - redirectTo: ({ params }) => { - const nodeId = params['nodeId']; - const projectService = inject(TeacherProjectService); - const components = projectService - .getComponents(nodeId) - .filter((component) => projectService.componentHasWork(component)); - return `node/${nodeId}/component/${components[0].id}`; - } - }, - { - path: 'node/:nodeId/component/:componentId', component: NodeGradingComponent }, { path: 'notebook', component: NotebookGradingComponent }, diff --git a/src/assets/wise5/authoringTool/authoring-tool.component.html b/src/assets/wise5/authoringTool/authoring-tool.component.html index d2b8157ba43..dc7a20e0f02 100644 --- a/src/assets/wise5/authoringTool/authoring-tool.component.html +++ b/src/assets/wise5/authoringTool/authoring-tool.component.html @@ -3,7 +3,7 @@
- + - + @if (showToolbar) { diff --git a/src/assets/wise5/authoringTool/authoring-tool.component.ts b/src/assets/wise5/authoringTool/authoring-tool.component.ts index 01105cedbb3..f1d5347d8d1 100644 --- a/src/assets/wise5/authoringTool/authoring-tool.component.ts +++ b/src/assets/wise5/authoringTool/authoring-tool.component.ts @@ -5,14 +5,32 @@ import { NotificationService } from '../services/notificationService'; import { TeacherProjectService } from '../services/teacherProjectService'; import { SessionService } from '../services/sessionService'; import { TeacherDataService } from '../services/teacherDataService'; -import { NavigationEnd, Router } from '@angular/router'; +import { NavigationEnd, Router, RouterModule } from '@angular/router'; import { MatDialog, MatDialogRef } from '@angular/material/dialog'; import { DialogWithConfirmComponent } from '../directives/dialog-with-confirm/dialog-with-confirm.component'; +import { CommonModule } from '@angular/common'; +import { AuthoringToolBarComponent } from './components/shared/authoring-tool-bar/authoring-tool-bar.component'; +import { MainMenuComponent } from '../common/main-menu/main-menu.component'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { TopBarComponent } from './components/top-bar/top-bar.component'; +import { SideMenuComponent } from '../common/side-menu/side-menu.component'; +import { FlexLayoutModule } from '@angular/flex-layout'; +import { ScrollingModule } from '@angular/cdk/scrolling'; @Component({ - styleUrls: ['./authoring-tool.component.scss'], - templateUrl: './authoring-tool.component.html', - standalone: false + imports: [ + AuthoringToolBarComponent, + CommonModule, + FlexLayoutModule, + MainMenuComponent, + MatSidenavModule, + RouterModule, + ScrollingModule, + SideMenuComponent, + TopBarComponent + ], + styleUrl: './authoring-tool.component.scss', + templateUrl: './authoring-tool.component.html' }) export class AuthoringToolComponent { protected isMenuOpen: boolean = false; @@ -233,7 +251,8 @@ export class AuthoringToolComponent { } private getElements(): any[] { - const elementsToDisable = 'button,input,textarea,mat-radio-button,mat-checkbox,mat-icon[cdkdraghandle]'; + const elementsToDisable = + 'button,input,textarea,mat-radio-button,mat-checkbox,mat-icon[cdkdraghandle]'; return Array.from( this.elem.nativeElement.querySelectorAll(`div.main-content ${elementsToDisable}`) ).concat( diff --git a/src/assets/wise5/authoringTool/new-project-template.ts b/src/assets/wise5/authoringTool/new-project-template.ts index ca539786fc4..c035ab2e5fe 100644 --- a/src/assets/wise5/authoringTool/new-project-template.ts +++ b/src/assets/wise5/authoringTool/new-project-template.ts @@ -47,6 +47,7 @@ export const newProjectTemplate = { }, metadata: { title: '', + features: [], resources: [], unitType: 'Platform' }, diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-grading-view/component-grading-view.component.html b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-grading-view/component-grading-view.component.html index 5602d6be298..9660500f5a1 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-grading-view/component-grading-view.component.html +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-grading-view/component-grading-view.component.html @@ -33,4 +33,3 @@ }
- diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-grading-view/component-grading-view.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-grading-view/component-grading-view.component.ts index 4671091ae29..1f0de804660 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-grading-view/component-grading-view.component.ts +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-grading-view/component-grading-view.component.ts @@ -7,7 +7,6 @@ import { TeacherDataService } from '../../../services/teacherDataService'; import { isMatchingPeriods } from '../../../common/period/period'; import { AnnotationService } from '../../../services/annotationService'; import { Node } from '../../../common/Node'; -import { ComponentClassResponsesComponent } from '../component-class-responses/component-class-responses.component'; import { MilestoneReportButtonComponent } from '../milestone-report-button/milestone-report-button.component'; import { PeerGroupButtonComponent } from '../peer-group-button/peer-group-button.component'; import { ComponentCompletionComponent } from '../component-completion/component-completion.component'; @@ -17,7 +16,6 @@ import { ComponentContent } from '../../../common/ComponentContent'; @Component({ imports: [ ComponentAverageScoreComponent, - ComponentClassResponsesComponent, ComponentCompletionComponent, MilestoneReportButtonComponent, PeerGroupButtonComponent, diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.html b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.html new file mode 100644 index 00000000000..723ede07dd7 --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.html @@ -0,0 +1,21 @@ + + @if (components.length == 1) { + + + } @else if (components.length > 1) { + + {{ selectedText }} + @for (component of components; track component.id; let i = $index) { + + {{ i + 1 }}: {{ getComponentTypeLabel(component.type) }} + + } + + } + diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.scss b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.scss new file mode 100644 index 00000000000..409d37e82a1 --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.scss @@ -0,0 +1,10 @@ +@use '@angular/material' as mat; + +.component-select { + @include mat.form-field-overrides( + ( + container-vertical-padding: 8px, + container-height: 40px + ) + ); +} \ No newline at end of file diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.spec.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.spec.ts new file mode 100644 index 00000000000..f2b9c28cf47 --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.spec.ts @@ -0,0 +1,84 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { FilterComponentsComponent } from './filter-components.component'; +import { MockProvider } from 'ng-mocks'; +import { ComponentTypeService } from '../../../../services/componentTypeService'; +import { ComponentContent } from '../../../../common/ComponentContent'; +import { HarnessLoader } from '@angular/cdk/testing'; +import { MatSelectHarness } from '@angular/material/select/testing'; +import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; + +let component: FilterComponentsComponent; +let fixture: ComponentFixture; +let loader: HarnessLoader; +let select: MatSelectHarness; +describe('FilterComponentsComponent', () => { + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [FilterComponentsComponent], + providers: [MockProvider(ComponentTypeService)] + }).compileComponents(); + + fixture = TestBed.createComponent(FilterComponentsComponent); + loader = TestbedHarnessEnvironment.loader(fixture); + component = fixture.componentInstance; + }); + onlyOneComponent(); + moreThanOneComponent(); +}); + +function onlyOneComponent() { + describe('when there is only 1 component', () => { + beforeEach(async () => { + component.components = [ + { + id: 'c1', + type: 'MultipleChoice' + } as ComponentContent + ]; + fixture.detectChanges(); + select = await loader.getHarness(MatSelectHarness); + }); + it('should be disabled', async () => { + expect(await select.isDisabled()).toBe(true); + }); + }); +} + +function moreThanOneComponent() { + describe('when there is more than 1 component', () => { + beforeEach(async () => { + component.components = [ + { + id: 'c1', + type: 'MultipleChoice' + } as ComponentContent, + { + id: 'c2', + type: 'OpenResponse' + } as ComponentContent + ]; + component.ngOnChanges(); + fixture.detectChanges(); + select = await loader.getHarness(MatSelectHarness); + }); + it('should show options', async () => { + await select.open(); + const options = await select.getOptions(); + expect(options.length).toBe(2); + expect(await options[0].isSelected()).toBe(true); + expect(await options[1].isSelected()).toBe(true); + }); + it('clicking on an option should emit selected components', async () => { + const spy = spyOn(component.componentsChange, 'emit').and.callThrough(); + await select.open(); + const options = await select.getOptions(); + await options[0].click(); + expect(spy).toHaveBeenCalledWith([ + { + id: 'c2', + type: 'OpenResponse' + } as ComponentContent + ]); + }); + }); +} diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.ts new file mode 100644 index 00000000000..74cea9ce3dc --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.ts @@ -0,0 +1,47 @@ +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatSelectModule } from '@angular/material/select'; +import { MatButtonModule } from '@angular/material/button'; +import { FormsModule } from '@angular/forms'; +import { ComponentTypeService } from '../../../../services/componentTypeService'; +import { ComponentContent } from '../../../../common/ComponentContent'; + +@Component({ + imports: [CommonModule, FormsModule, MatButtonModule, MatFormFieldModule, MatSelectModule], + selector: 'filter-components', + styleUrls: ['./filter-components.component.scss'], + templateUrl: './filter-components.component.html' +}) +export class FilterComponentsComponent { + @Input() components: ComponentContent[]; + @Output() componentsChange: EventEmitter = new EventEmitter< + ComponentContent[] + >(); + protected selectedComponents: ComponentContent[]; + protected selectedText: string; + + constructor(private componentTypeService: ComponentTypeService) {} + + ngOnChanges(): void { + this.selectedComponents = this.components; + this.updateSelectedText(); + } + + private updateSelectedText(): void { + this.selectedText = $localize`Showing ${this.selectedComponents.length}/${this.components.length} items`; + } + + protected getComponentTypeLabel(componentType: string): string { + return this.componentTypeService.getComponentTypeLabel(componentType); + } + + protected compareById(component1: ComponentContent, component2: ComponentContent): boolean { + return component1?.id === component2?.id; + } + + protected updateSelectedComponents(): void { + this.updateSelectedText(); + this.componentsChange.emit(this.selectedComponents); + } +} diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html new file mode 100644 index 00000000000..ab80d92c8a4 --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html @@ -0,0 +1,98 @@ + + +
+ + + + +
+
+ +
+ + + +
+
+
+ @for (workgroup of sortedWorkgroups; track workgroup.workgroupId) { + @if (isWorkgroupShown(workgroup)) { + + } + } +
+
diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.scss b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.scss new file mode 100644 index 00000000000..5f34e4a1459 --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.scss @@ -0,0 +1,12 @@ +.user-list { + padding-top: 0; +} + +.table--list__thead__link { + padding: 0; +} + +.mdc-list-item.user-list-controls { + height: auto; + padding: 8px 16px; +} diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.spec.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.spec.ts new file mode 100644 index 00000000000..579a1fde24d --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.spec.ts @@ -0,0 +1,56 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { NodeClassResponsesComponent } from './node-class-responses.component'; +import { AnnotationService } from '../../../../services/annotationService'; +import { MockComponent, MockProvider, MockProviders } from 'ng-mocks'; +import { ClassroomStatusService } from '../../../../services/classroomStatusService'; +import { ComponentServiceLookupService } from '../../../../services/componentServiceLookupService'; +import { ConfigService } from '../../../../services/configService'; +import { TeacherDataService } from '../../../../services/teacherDataService'; +import { NotificationService } from '../../../../services/notificationService'; +import { TeacherProjectService } from '../../../../services/teacherProjectService'; +import { of } from 'rxjs'; +import { WorkgroupSelectAutocompleteComponent } from '../../../../../../app/classroom-monitor/workgroup-select/workgroup-select-autocomplete/workgroup-select-autocomplete.component'; +import { MatButtonHarness } from '@angular/material/button/testing'; +import { HarnessLoader } from '@angular/cdk/testing'; +import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; + +describe('NodeClassResponsesComponent', () => { + let component: NodeClassResponsesComponent; + let fixture: ComponentFixture; + let loader: HarnessLoader; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [MockComponent(WorkgroupSelectAutocompleteComponent)], + imports: [NodeClassResponsesComponent], + providers: [ + MockProviders( + AnnotationService, + ClassroomStatusService, + ComponentServiceLookupService, + ConfigService, + TeacherDataService, + NotificationService + ), + MockProvider(TeacherProjectService, { + projectSaved$: of() + }) + ] + }).compileComponents(); + + fixture = TestBed.createComponent(NodeClassResponsesComponent); + loader = TestbedHarnessEnvironment.loader(fixture); + component = fixture.componentInstance; + component['sortedWorkgroups'] = [ + { workgroupId: 1, name: 'Workgroup 1' }, + { workgroupId: 2, name: 'Workgroup 2' } + ]; + fixture.detectChanges(); + }); + + it('clicking on the expand all button should expand all teams', async () => { + expect(component['allWorkgroupsExpanded']).toBeFalsy(); + await (await loader.getHarness(MatButtonHarness.with({ text: '+ Expand all' }))).click(); + expect(component['allWorkgroupsExpanded']).toBeTrue(); + }); +}); diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.ts new file mode 100644 index 00000000000..90be65a0e18 --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.ts @@ -0,0 +1,127 @@ +import { Component, Input } from '@angular/core'; +import { MatListModule } from '@angular/material/list'; +import { WorkgroupSelectAutocompleteComponent } from '../../../../../../app/classroom-monitor/workgroup-select/workgroup-select-autocomplete/workgroup-select-autocomplete.component'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { IntersectionObserverModule } from '@ng-web-apis/intersection-observer'; +import { CommonModule } from '@angular/common'; +import { AbstractClassResponsesComponent } from '../../AbstractClassResponsesComponent'; +import { Node } from '../../../../common/Node'; +import { ComponentContent } from '../../../../common/ComponentContent'; +import { NodeWorkgroupItemComponent } from '../node-workgroup-item/node-workgroup-item.component'; +import { AnnotationService } from '../../../../services/annotationService'; +import { ClassroomStatusService } from '../../../../services/classroomStatusService'; +import { ComponentServiceLookupService } from '../../../../services/componentServiceLookupService'; +import { ConfigService } from '../../../../services/configService'; +import { TeacherDataService } from '../../../../services/teacherDataService'; +import { NotificationService } from '../../../../services/notificationService'; +import { TeacherProjectService } from '../../../../services/teacherProjectService'; +import { Subscription } from 'rxjs'; + +@Component({ + imports: [ + CommonModule, + IntersectionObserverModule, + MatButtonModule, + MatIconModule, + MatListModule, + NodeWorkgroupItemComponent, + WorkgroupSelectAutocompleteComponent + ], + selector: 'node-class-responses', + styleUrl: './node-class-responses.component.scss', + templateUrl: './node-class-responses.component.html' +}) +export class NodeClassResponsesComponent extends AbstractClassResponsesComponent { + @Input() components: ComponentContent[]; + protected maxScore: number; + @Input() node: Node; + private subscriptions: Subscription = new Subscription(); + + constructor( + protected annotationService: AnnotationService, + protected classroomStatusService: ClassroomStatusService, + private componentServiceLookupService: ComponentServiceLookupService, + protected configService: ConfigService, + protected dataService: TeacherDataService, + protected notificationService: NotificationService, + protected projectService: TeacherProjectService + ) { + super( + annotationService, + classroomStatusService, + configService, + dataService, + notificationService, + projectService + ); + } + + ngOnInit(): void { + this.subscriptions.add(this.projectService.projectSaved$.subscribe(() => this.setMaxScore())); + } + + ngOnChanges(): void { + if (this.node && this.components) { + this.retrieveStudentData(this.node); + this.setMaxScore(); + } + } + + ngOnDestroy(): void { + this.subscriptions.unsubscribe(); + } + + private setMaxScore(): void { + this.maxScore = this.components + .map( + (component) => this.projectService.getMaxScoreForComponent(this.node.id, component.id) ?? 0 + ) + .reduce((accumulator, currentValue) => accumulator + currentValue, 0); + } + + protected setWorkgroupsById(): void { + this.workgroups.forEach((workgroup) => { + this.workgroupsById[workgroup.workgroupId] = workgroup; + this.updateWorkgroup(workgroup); + }); + } + + protected getWorkgroupScore(workgroupId: number): number { + return this.annotationService.getTotalNodeScore(workgroupId, this.node, this.components); + } + + protected hasWork(): boolean { + return this.projectService.nodeHasWork(this.node.id); + } + + protected isCompleted(workgroupId: number, nodeStatus: any): boolean { + return this.components.every((component) => this.isComponentCompleted(workgroupId, component)); + } + + private isComponentCompleted(workgroupId: number, component: ComponentContent): boolean { + const service = this.componentServiceLookupService.getService(component.type); + const workgroupComponentStates = this.dataService.getComponentStatesByWorkgroupIdAndComponentId( + workgroupId, + component.id + ); + return ['OpenResponse', 'Discussion'].includes(component.type) + ? service.isCompletedV2(this.node, component, { + componentStates: workgroupComponentStates + }) + : service.isCompleted( + component, + workgroupComponentStates, + this.dataService.getEventsByNodeId(this.node.id), + this.node + ); + } + + protected getComponentStates(): any[] { + return this.dataService + .getComponentStatesByNodeId(this.node.id) + .filter((componentState) => + this.components.some((component) => component.id === componentState.componentId) + ); + } +} diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.html b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.html index fa6759e4a44..b9f248ef0c2 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.html +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.html @@ -24,14 +24,13 @@

-
- Question: - +

Class Responses

+
- + diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.spec.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.spec.ts index 3d0c5df16e7..3a9c7d17585 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.spec.ts +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.spec.ts @@ -2,15 +2,13 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NodeGradingComponent } from './node-grading.component'; import { TeacherProjectService } from '../../../../services/teacherProjectService'; import { TeacherDataService } from '../../../../services/teacherDataService'; -import { provideRouter } from '@angular/router'; -import { MockProviders } from 'ng-mocks'; +import { MockComponent, MockProviders } from 'ng-mocks'; import { ClassroomStatusService } from '../../../../services/classroomStatusService'; import { Node } from '../../../../common/Node'; import { Observable, Subject } from 'rxjs'; -import { AnnotationService } from '../../../../services/annotationService'; -import { ComponentServiceLookupService } from '../../../../services/componentServiceLookupService'; import { ClassroomMonitorTestingModule } from '../../../classroom-monitor-testing.module'; import { WorkgroupService } from '../../../../../../app/services/workgroup.service'; +import { FilterComponentsComponent } from '../filter-components/filter-components.component'; let classroomStatusService: ClassroomStatusService; let component: NodeGradingComponent; @@ -41,10 +39,10 @@ class MockDataService { describe('NodeGradingComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ + declarations: [MockComponent(FilterComponentsComponent)], imports: [NodeGradingComponent, ClassroomMonitorTestingModule], providers: [ MockProviders(ClassroomStatusService, TeacherProjectService, WorkgroupService), - provideRouter([]), { provide: TeacherDataService, useClass: MockDataService } ] }).compileComponents(); @@ -65,7 +63,6 @@ describe('NodeGradingComponent', () => { component = fixture.componentInstance; component.nodeId = 'node1'; component.ngOnInit(); - component.ngOnChanges(); }); periodChanged_RecalculateNodeCompletion(); @@ -74,6 +71,7 @@ describe('NodeGradingComponent', () => { function periodChanged_RecalculateNodeCompletion() { describe('period changed', () => { it('recalculates node completion', () => { + nodeCompletionSpy.calls.reset(); dataService.setCurrentPeriod({ periodId: 1 }); expect(nodeCompletionSpy).toHaveBeenCalledTimes(1); }); diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.ts index e0606302b99..c41bcba353c 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.ts +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.ts @@ -7,26 +7,22 @@ import { FlexLayoutModule } from '@angular/flex-layout'; import { MatIconModule } from '@angular/material/icon'; import { MatDialog } from '@angular/material/dialog'; import { ShowNodeInfoDialogComponent } from '../../../../../../app/classroom-monitor/show-node-info-dialog/show-node-info-dialog.component'; -import { SelectComponentComponent } from '../select-component/select-component.component'; import { Node } from '../../../../common/Node'; import { Subscription } from 'rxjs'; -import { ActivatedRoute, Router, RouterModule } from '@angular/router'; -import { ComponentGradingViewComponent } from '../../component-grading-view/component-grading-view.component'; -import { ComponentContent } from '../../../../common/ComponentContent'; import { MatButtonModule } from '@angular/material/button'; +import { FilterComponentsComponent } from '../filter-components/filter-components.component'; +import { ComponentContent } from '../../../../common/ComponentContent'; +import { NodeClassResponsesComponent } from '../node-class-responses/node-class-responses.component'; @Component({ imports: [ CommonModule, - ComponentGradingViewComponent, + FilterComponentsComponent, FlexLayoutModule, MatButtonModule, MatIconModule, - RouterModule, - SelectComponentComponent + NodeClassResponsesComponent ], - selector: 'node-grading', - standalone: true, styles: [ ` .content-head-label { @@ -40,14 +36,16 @@ import { MatButtonModule } from '@angular/material/button'; .list-item { display: block; } + + .mat-body-1 { + margin: 0; + } ` ], templateUrl: './node-grading.component.html' }) export class NodeGradingComponent { - protected component: ComponentContent; - @Input() componentId: string; - protected components: any[]; + protected components: ComponentContent[]; protected hasWork: boolean; protected node: Node; protected nodeAverageScore: number; @@ -57,17 +55,17 @@ export class NodeGradingComponent { protected numRubrics: number; private periodId: number; private subscriptions: Subscription = new Subscription(); + protected visibleComponents: ComponentContent[]; constructor( private classroomStatusService: ClassroomStatusService, private dataService: TeacherDataService, private dialog: MatDialog, - private projectService: TeacherProjectService, - private route: ActivatedRoute, - private router: Router + private projectService: TeacherProjectService ) {} ngOnInit(): void { + this.setFields(); this.subscriptions.add( this.dataService.currentPeriodChanged$.subscribe(() => this.setPeriod()) ); @@ -78,9 +76,7 @@ export class NodeGradingComponent { } ngOnChanges(): void { - if (this.nodeId && this.componentId) { - this.setFields(); - } + this.setFields(); } private setFields(): void { @@ -98,7 +94,7 @@ export class NodeGradingComponent { this.components = this.projectService .getComponents(this.nodeId) .filter((component) => this.projectService.componentHasWork(component)); - this.component = this.node.getComponent(this.componentId); + this.visibleComponents = this.components; this.numRubrics = this.node.getNumRubrics(); this.setPeriod(); } @@ -123,16 +119,14 @@ export class NodeGradingComponent { ).completionPct; } + protected setVisibleComponents(visibleComponents: ComponentContent[]): void { + this.visibleComponents = visibleComponents; + } + protected showRubric(): void { this.dialog.open(ShowNodeInfoDialogComponent, { data: this.nodeId, width: '90%' }); } - - protected navigateToComponent(component: ComponentContent): void { - this.router.navigate(['..', component.id], { - relativeTo: this.route - }); - } } diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.html b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.html new file mode 100644 index 00000000000..29810d3cf82 --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.html @@ -0,0 +1,66 @@ +
+ + @if (expanded && !disabled) { + +
+ @for (component of components; track component.id; let i = $index) { + @if (componentIdToIsVisible[component.id]) { +
+
+

+ {{ i + 1 + '. ' + getComponentTypeLabel(component.type) }}  + +

+ +
+
+ } + } +
+
+ } +
diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.scss b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.scss new file mode 100644 index 00000000000..57e36e9976f --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.scss @@ -0,0 +1,24 @@ +.grading__item-container { + height: auto; +} + +.node-workgroup-item { + .team-button { + min-height: 56px; + text-transform: none; + text-align: initial; + } + + .mdc-button__label { + text-transform: none; + width: 100%; + } + + .mdc-list-item.mdc-list-item--with-one-line { + height: auto; + } + + .mat-headline-5 { + margin: 0; + } +} diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.spec.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.spec.ts new file mode 100644 index 00000000000..48803a537b6 --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.spec.ts @@ -0,0 +1,40 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { NodeWorkgroupItemComponent } from './node-workgroup-item.component'; +import { MockProvider, MockProviders } from 'ng-mocks'; +import { AnnotationService } from '../../../../services/annotationService'; +import { ComponentTypeService } from '../../../../services/componentTypeService'; +import { TeacherProjectService } from '../../../../services/teacherProjectService'; +import { Node } from '../../../../common/Node'; +import { Annotation } from '../../../../common/Annotation'; +import { of } from 'rxjs'; + +describe('NodeWorkgroupItemComponent', () => { + let component: NodeWorkgroupItemComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [NodeWorkgroupItemComponent], + providers: [ + MockProvider(AnnotationService, { + annotationReceived$: of({} as Annotation) + }), + MockProviders(ComponentTypeService, TeacherProjectService) + ] + }).compileComponents(); + + fixture = TestBed.createComponent(NodeWorkgroupItemComponent); + component = fixture.componentInstance; + component.node = { id: 'node1' } as Node; + component.components = []; + component.workgroup = { workgroupId: 1, nodeStatus: { componentStatus: {} } }; + fixture.detectChanges(); + }); + + it('should show team 1 with status', () => { + expect(component).toBeTruthy(); + const textContent = fixture.nativeElement.textContent; + expect(textContent).toContain('Team 1'); + expect(textContent).toContain('Not Visited'); + }); +}); diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.ts new file mode 100644 index 00000000000..41f7b6b1c3c --- /dev/null +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.ts @@ -0,0 +1,163 @@ +import { + Component, + EventEmitter, + Input, + Output, + SimpleChanges, + ViewEncapsulation +} from '@angular/core'; +import { calculateComponentVisibility } from '../../shared/grading-helpers/grading-helpers'; +import { ComponentTypeService } from '../../../../services/componentTypeService'; +import { TeacherProjectService } from '../../../../services/teacherProjectService'; +import { WorkgroupComponentGradingComponent } from '../../workgroup-component-grading/workgroup-component-grading.component'; +import { ComponentNewWorkBadgeComponent } from '../../../../../../app/classroom-monitor/component-new-work-badge/component-new-work-badge.component'; +import { WorkgroupNodeScoreComponent } from '../../shared/workgroupNodeScore/workgroup-node-score.component'; +import { WorkgroupNodeStatusComponent } from '../../../../../../app/classroom-monitor/workgroup-node-status/workgroup-node-status.component'; +import { WorkgroupInfoComponent } from '../workgroupInfo/workgroup-info.component'; +import { FlexLayoutModule } from '@angular/flex-layout'; +import { MatListModule } from '@angular/material/list'; +import { MatButtonModule } from '@angular/material/button'; +import { CommonModule } from '@angular/common'; +import { Node } from '../../../../common/Node'; +import { ComponentContent } from '../../../../common/ComponentContent'; +import { filter, Subscription } from 'rxjs'; +import { AnnotationService } from '../../../../services/annotationService'; + +@Component({ + encapsulation: ViewEncapsulation.None, + imports: [ + CommonModule, + MatButtonModule, + MatListModule, + FlexLayoutModule, + WorkgroupInfoComponent, + WorkgroupNodeStatusComponent, + WorkgroupNodeScoreComponent, + ComponentNewWorkBadgeComponent, + WorkgroupComponentGradingComponent + ], + selector: 'node-workgroup-item', + styleUrl: './node-workgroup-item.component.scss', + templateUrl: './node-workgroup-item.component.html' +}) +export class NodeWorkgroupItemComponent { + private componentIdToHasWork: { [componentId: string]: boolean } = {}; + protected componentIdToIsVisible: { [componentId: string]: boolean } = {}; + @Input() components: ComponentContent[] = []; + protected disabled: boolean; + @Input() expanded: boolean; + protected hasAlert: boolean; + protected hasNewAlert: boolean; + @Input() maxScore: number; + private nodeHasWork: boolean; + @Input() node: Node; + @Output() onUpdateExpand: EventEmitter = new EventEmitter(); + protected score: any; + private status: any; + protected statusClass: string; + protected statusText: string = ''; + private subscriptions: Subscription = new Subscription(); + @Input() workgroup: any; + + constructor( + private annotationService: AnnotationService, + private componentTypeService: ComponentTypeService, + private projectService: TeacherProjectService + ) {} + + ngOnInit(): void { + this.updateNode(); + this.updateStatus(); + this.subscribeToAnnotations(); + } + + private subscribeToAnnotations(): void { + this.subscriptions.add( + this.annotationService.annotationReceived$ + .pipe( + filter( + (annotation) => + annotation.nodeId === this.node.id && + annotation.toWorkgroupId === this.workgroup.workgroupId + ) + ) + .subscribe( + () => + (this.score = this.annotationService.getTotalNodeScore( + this.workgroup.workgroupId, + this.node, + this.components + )) + ) + ); + } + + private updateNode(): void { + this.nodeHasWork = this.projectService.nodeHasWork(this.node.id); + this.componentIdToHasWork = this.projectService.calculateComponentIdToHasWork(this.components); + this.componentIdToIsVisible = calculateComponentVisibility( + this.componentIdToHasWork, + this.workgroup.nodeStatus.componentStatuses + ); + } + + ngOnChanges(changes: SimpleChanges): void { + if (changes.workgroup) { + const workgroup = changes.workgroup.currentValue; + this.hasAlert = workgroup.hasAlert; + this.hasNewAlert = workgroup.hasNewAlert; + this.status = workgroup.completionStatus; + this.score = workgroup.score != null ? workgroup.score : '-'; + this.workgroup = workgroup; + this.updateNode(); + this.updateStatus(); + } + if (changes.nodeId) { + this.updateNode(); + } + } + + ngOnDestroy(): void { + this.subscriptions.unsubscribe(); + } + + protected getComponentTypeLabel(componentType): string { + return this.componentTypeService.getComponentTypeLabel(componentType); + } + + private updateStatus(): void { + switch (this.status) { + case -1: + this.statusClass = ' '; + this.statusText = $localize`Not Assigned`; + break; + case 2: + this.statusClass = 'success'; + if (this.nodeHasWork) { + this.statusText = $localize`Completed`; + } else { + this.statusText = $localize`Visited`; + } + break; + case 1: + this.statusClass = 'text'; + this.statusText = $localize`Partially Completed`; + break; + default: + this.statusClass = 'text-secondary'; + if (this.nodeHasWork) { + this.statusText = $localize`No Work`; + } else { + this.statusText = $localize`Not Visited`; + } + } + if (this.hasNewAlert) { + this.statusClass = 'warn'; + } + this.disabled = this.status === -1; + } + + protected toggleExpand(): void { + this.onUpdateExpand.emit({ workgroupId: this.workgroup.workgroupId, value: !this.expanded }); + } +} diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.html b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.html deleted file mode 100644 index 50a3187660e..00000000000 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.html +++ /dev/null @@ -1,10 +0,0 @@ - - - @for (component of components; track component.id; let i = $index) { - - {{ i + 1 }}. {{ getComponentTypeLabel(component.type) }} - - } - - - of {{ components.length }} diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.scss b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.scss deleted file mode 100644 index 3efe750dd27..00000000000 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.scss +++ /dev/null @@ -1,24 +0,0 @@ -@use '@angular/material' as mat; -@use 'style/base/typography'; - -.select-component { - .mdc-line-ripple { - &:before, &:after { - display: none; - } - } - - .mdc-text-field--no-label:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mat-mdc-form-field-infix { - padding-top: 6px; - padding-bottom: 6px; - min-height: 28px; - } - - .mat-mdc-form-field-flex { - height: 36px; - } - -.mat-mdc-select-value-text, .mat-mdc-form-field-input-control.mat-mdc-form-field-input-control { - font-size: mat.m2-font-size(typography.$wise-typography, 'caption'); - } -} diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.spec.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.spec.ts deleted file mode 100644 index 7f6e965293c..00000000000 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { SelectComponentComponent } from './select-component.component'; - -describe('SelectComponentComponent', () => { - let component: SelectComponentComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [SelectComponentComponent] - }).compileComponents(); - - fixture = TestBed.createComponent(SelectComponentComponent); - component = fixture.componentInstance; - component.components = []; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.ts deleted file mode 100644 index 955f0965955..00000000000 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core'; -import { MatSelectModule } from '@angular/material/select'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -import { ComponentContent } from '../../../../common/ComponentContent'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { ComponentTypeService } from '../../../../services/componentTypeService'; - -@Component({ - encapsulation: ViewEncapsulation.None, - imports: [CommonModule, FormsModule, MatFormFieldModule, MatSelectModule], - selector: 'select-component', - standalone: true, - styleUrls: ['./select-component.component.scss'], - templateUrl: './select-component.component.html' -}) -export class SelectComponentComponent { - @Input() components: any[]; - @Input() selectedComponent: ComponentContent; - @Output() componentChangedEvent: EventEmitter = new EventEmitter(); - - constructor(private componentTypeService: ComponentTypeService) {} - - protected selectComponent(component: ComponentContent): void { - this.selectedComponent = component; - this.componentChangedEvent.emit(component); - } - - protected getComponentTypeLabel(componentType: string): string { - return this.componentTypeService.getComponentTypeLabel(componentType); - } -} diff --git a/src/assets/wise5/components/match/match-student/match-student-default/match-student-default.component.ts b/src/assets/wise5/components/match/match-student/match-student-default/match-student-default.component.ts index 02daaf0aac8..b4b072f3999 100644 --- a/src/assets/wise5/components/match/match-student/match-student-default/match-student-default.component.ts +++ b/src/assets/wise5/components/match/match-student/match-student-default/match-student-default.component.ts @@ -38,6 +38,7 @@ import { NotebookService } from '../../../../services/notebookService'; import { ProjectService } from '../../../../services/projectService'; import { StudentAssetService } from '../../../../services/studentAssetService'; import { StudentDataService } from '../../../../services/studentDataService'; +import { CRaterIdea } from '../../../common/cRater/CRaterIdea'; @Component({ imports: [ @@ -613,11 +614,17 @@ export class MatchStudentDefaultComponent extends ComponentStudent { } private addIdeasToSourceBucket(responses: any[], rubric: CRaterRubric): void { - getUniqueIdeas(responses, rubric).forEach((idea) => { - const choice = new Choice(idea.name, idea.text); - this.choices.push(choice); - this.getBucketById(this.sourceBucketId).items.push(choice); - }); + getUniqueIdeas(responses, rubric) + .filter((idea) => !this.isInSourceBucket(idea)) + .forEach((idea) => { + const choice = new Choice(idea.name, idea.text); + this.choices.push(choice); + this.getBucketById(this.sourceBucketId).items.push(choice); + }); + } + + private isInSourceBucket(idea: CRaterIdea): boolean { + return this.sourceBucket.items.some((item) => item.value === idea.text); } protected addChoice(): void { diff --git a/src/assets/wise5/services/annotationService.ts b/src/assets/wise5/services/annotationService.ts index 8f9998c0e34..aa9b3fe024f 100644 --- a/src/assets/wise5/services/annotationService.ts +++ b/src/assets/wise5/services/annotationService.ts @@ -5,6 +5,8 @@ import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Observable, Subject } from 'rxjs'; import { generateRandomKey } from '../common/string/string'; import { Annotation } from '../common/Annotation'; +import { Node } from '../common/Node'; +import { ComponentContent } from '../common/ComponentContent'; @Injectable() export class AnnotationService { @@ -251,6 +253,17 @@ export class AnnotationService { return annotation.type === 'score' || annotation.type === 'autoScore'; } + getTotalNodeScore(workgroupId: number, node: Node, components: ComponentContent[]): number { + return this.getTotalScore( + this.annotations.filter( + (annotation) => + annotation.nodeId === node.id && + annotation.toWorkgroupId === workgroupId && + components.some((component) => component.id === annotation.componentId) + ) + ); + } + getTotalNodeScoreForWorkgroup(workgroupId: number, nodeId: string) { const annotationsForNodeAndWorkgroup = this.annotations.filter((annotation) => { return annotation.nodeId === nodeId && annotation.toWorkgroupId === workgroupId; diff --git a/src/messages.xlf b/src/messages.xlf index 74c6b198b3c..513303072d4 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -283,7 +283,7 @@ src/app/modules/library/library-project-details/library-project-details.component.html - 198,202 + 208,212 src/app/modules/library/public-unit-type-selector/community-library-details.html @@ -821,7 +821,7 @@ src/assets/wise5/authoringTool/authoring-tool.component.ts - 96 + 114 src/assets/wise5/authoringTool/components/shared/authoring-tool-bar/authoring-tool-bar.component.ts @@ -1059,7 +1059,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/modules/library/library-filters/library-filters.component.html - 46,47 + 47,48 src/assets/wise5/authoringTool/milestones-authoring/milestones-authoring.component.html @@ -2303,7 +2303,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-home/teacher-home.component.ts - 23 + 22 @@ -2314,7 +2314,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-home/teacher-home.component.ts - 22 + 21 src/app/teacher/teacher-run-list/teacher-run-list.component.html @@ -2333,7 +2333,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/authoring-tool.component.ts - 25 + 43 src/assets/wise5/authoringTool/components/shared/authoring-tool-bar/authoring-tool-bar.component.ts @@ -2362,14 +2362,14 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Public () src/app/curriculum/curriculum.component.ts - 76 + 77 My Units () src/app/curriculum/curriculum.component.ts - 80 + 81 @@ -2409,14 +2409,14 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html 29,30 - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-class-responses/component-class-responses.component.html - 71,73 - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html 90,92 + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html + 71,73 + src/assets/wise5/classroomMonitor/student-grading/student-grading.component.html 100,102 @@ -5468,7 +5468,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/modules/library/library-filters/library-filters.component.html - 117,119 + 121,123 src/app/modules/mobile-menu/mobile-menu.component.html @@ -5770,46 +5770,53 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.29,34 + + Type filter explanation + + src/app/modules/library/library-filters/library-filters.component.html + 54,58 + + Discipline src/app/modules/library/library-filters/library-filters.component.html - 63,65 + 67,69 Grade Level src/app/modules/library/library-filters/library-filters.component.html - 81,83 + 85,87 Standards Addressed src/app/modules/library/library-filters/library-filters.component.html - 100,102 + 104,106 WISE Platform src/app/modules/library/library-filters/library-filters.component.ts - 46 + 48 Other Platform src/app/modules/library/library-filters/library-filters.component.ts - 47 + 49 NGSS src/app/modules/library/library-filters/library-filters.component.ts - 110 + 114 src/app/modules/library/library-project-details/library-project-details.component.ts @@ -5820,7 +5827,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Common Core src/app/modules/library/library-filters/library-filters.component.ts - 111 + 115 src/app/modules/library/library-project-details/library-project-details.component.ts @@ -5831,13 +5838,34 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Learning For Justice src/app/modules/library/library-filters/library-filters.component.ts - 112 + 116 src/app/modules/library/library-project-details/library-project-details.component.ts 51 + + "Type" indicates the platform on which a unit runs. "WISE Platform" units are created + using the WISE authoring tool. Students use WISE accounts to complete lessons and teachers can review and grade + work on the WISE platform. "Other" units are created using different platforms. Resources for these units + are linked in the unit details. + + src/app/modules/library/library-filters/library-filters.component.ts + 185,188 + + + + Unit Type + + src/app/modules/library/library-filters/library-filters.component.ts + 192 + + + src/assets/wise5/authoringTool/edit-unit-type/edit-unit-type.component.html + 1,2 + + : @@ -5849,28 +5877,28 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Grade level: src/app/modules/library/library-project-details/library-project-details.component.html - 24,27 + 28,31 Duration: src/app/modules/library/library-project-details/library-project-details.component.html - 38,39 + 42,43 Unit ID: src/app/modules/library/library-project-details/library-project-details.component.html - 43,44 + 47,48 This unit is from an old version of WISE that is no longer supported. Please find an alternate unit to use in the future or contact us for upgrade options. src/app/modules/library/library-project-details/library-project-details.component.html - 64,67 + 68,71 src/app/teacher/teacher-run-list-item/teacher-run-list-item.component.html @@ -5881,88 +5909,95 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Legacy Unit src/app/modules/library/library-project-details/library-project-details.component.html - 67,71 + 71,75 src/app/modules/library/library-project/library-project.component.html 37,39 + + Note: This unit was created outside of the WISE platform. Teaching resources are linked below. + + src/app/modules/library/library-project-details/library-project-details.component.html + 77,81 + + Resources: src/app/modules/library/library-project-details/library-project-details.component.html - 73,75 + 83,85 Discipline: src/app/modules/library/library-project-details/library-project-details.component.html - 86,88 + 96,98 Features: src/app/modules/library/library-project-details/library-project-details.component.html - 98,99 + 108,109 Standards Addressed: src/app/modules/library/library-project-details/library-project-details.component.html - 111,113 + 121,123 This unit is a copy of (used under CC BY-SA). src/app/modules/library/library-project-details/library-project-details.component.html - 154,156 + 164,166 This unit is a copy of by (used under CC BY-SA). src/app/modules/library/library-project-details/library-project-details.component.html - 160,163 + 170,173 This unit is licensed under CC BY-SA. src/app/modules/library/library-project-details/library-project-details.component.html - 171,173 + 181,183 This unit is licensed under CC BY-SA by . src/app/modules/library/library-project-details/library-project-details.component.html - 176,178 + 186,188 View License src/app/modules/library/library-project-details/library-project-details.component.html - 183,187 + 193,197 More src/app/modules/library/library-project-details/library-project-details.component.html - 191,197 + 201,207 Use with Class src/app/modules/library/library-project-details/library-project-details.component.html - 207,212 + 217,222 src/app/teacher/create-run-dialog/create-run-dialog.component.html @@ -5973,7 +6008,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Preview src/app/modules/library/library-project-details/library-project-details.component.html - 213,217 + 225,227 src/app/teacher/run-menu/run-menu.component.html @@ -6004,6 +6039,13 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.71,74 + + Unit Resources + + src/app/modules/library/library-project-details/library-project-details.component.html + 227,232 + + License pertains to original content created by the author(s). Authors are responsible for the usage and attribution of any third-party content linked to or included in this work. @@ -6207,7 +6249,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Select all units src/app/modules/library/personal-library/personal-library.component.ts - 52 + 53 @@ -8964,7 +9006,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/authoringTool/authoring-tool.component.ts - 68 + 86 src/assets/wise5/authoringTool/components/shared/authoring-tool-bar/authoring-tool-bar.component.ts @@ -9265,10 +9307,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/app/teacher/select-runs-controls/select-runs-controls.component.html 23,24 - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-workgroup-item/component-workgroup-item.component.ts - 69 - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-details/milestone-details.component.html 85,88 @@ -9277,6 +9315,10 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component.ts 143 + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.ts + 137 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroup-item/workgroup-item.component.ts 104 @@ -10191,14 +10233,14 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Unit Home src/assets/wise5/authoringTool/authoring-tool.component.ts - 61 + 79 File Manager src/assets/wise5/authoringTool/authoring-tool.component.ts - 75 + 93 src/assets/wise5/authoringTool/components/shared/authoring-tool-bar/authoring-tool-bar.component.ts @@ -10209,7 +10251,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Notebook Settings src/assets/wise5/authoringTool/authoring-tool.component.ts - 82 + 100 src/assets/wise5/authoringTool/components/shared/authoring-tool-bar/authoring-tool-bar.component.ts @@ -10224,7 +10266,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Milestones src/assets/wise5/authoringTool/authoring-tool.component.ts - 89 + 107 src/assets/wise5/authoringTool/components/shared/authoring-tool-bar/authoring-tool-bar.component.ts @@ -10243,14 +10285,14 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Unit List src/assets/wise5/authoringTool/authoring-tool.component.ts - 103 + 121 You have been inactive for a long time. Do you want to stay logged in? src/assets/wise5/authoringTool/authoring-tool.component.ts - 117 + 135 src/assets/wise5/classroomMonitor/classroom-monitor.component.ts @@ -10265,7 +10307,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Session Timeout src/assets/wise5/authoringTool/authoring-tool.component.ts - 118 + 136 src/assets/wise5/classroomMonitor/classroom-monitor.component.ts @@ -10280,7 +10322,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Saving... src/assets/wise5/authoringTool/authoring-tool.component.ts - 142 + 160 src/assets/wise5/services/notificationService.ts @@ -10291,25 +10333,25 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Saved src/assets/wise5/authoringTool/authoring-tool.component.ts - 156 + 174 Error Saving Unit. Please refresh the page. src/assets/wise5/authoringTool/authoring-tool.component.ts - 163 + 181 You do not have permission to edit this unit. src/assets/wise5/authoringTool/authoring-tool.component.ts - 170 + 188 src/assets/wise5/authoringTool/authoring-tool.component.ts - 252 + 271 @@ -10882,7 +10924,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/assets/wise5/components/match/match-student/match-student-default/match-student-default.component.ts - 125 + 126 src/assets/wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html @@ -11224,13 +11266,6 @@ The branches will be removed but the steps will remain in the unit. 99 - - Unit Type - - src/assets/wise5/authoringTool/edit-unit-type/edit-unit-type.component.html - 1,2 - - WISE Platform (Uses features on this platform to collect student data) @@ -11473,11 +11508,7 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/authoringTool/new-project-template.ts - 79 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestone-report-button/milestone-report-button.component.html - 5,9 + 80 src/assets/wise5/services/notebookService.ts @@ -11756,7 +11787,7 @@ The branches will be removed but the steps will remain in the unit. Notebook src/assets/wise5/authoringTool/new-project-template.ts - 55 + 56 src/assets/wise5/services/notebookService.ts @@ -11767,11 +11798,11 @@ The branches will be removed but the steps will remain in the unit. note src/assets/wise5/authoringTool/new-project-template.ts - 67 + 68 src/assets/wise5/authoringTool/new-project-template.ts - 109 + 110 src/assets/wise5/services/notebookService.ts @@ -11782,11 +11813,11 @@ The branches will be removed but the steps will remain in the unit. notes src/assets/wise5/authoringTool/new-project-template.ts - 68 + 69 src/assets/wise5/authoringTool/new-project-template.ts - 110 + 111 src/assets/wise5/services/notebookService.ts @@ -11797,11 +11828,11 @@ The branches will be removed but the steps will remain in the unit. Notes src/assets/wise5/authoringTool/new-project-template.ts - 69 + 70 src/assets/wise5/authoringTool/new-project-template.ts - 111 + 112 src/assets/wise5/classroomMonitor/classroomMonitorComponents/notebook/notebook-workgroup-grading/notebook-workgroup-grading.component.html @@ -11820,7 +11851,7 @@ The branches will be removed but the steps will remain in the unit. report src/assets/wise5/authoringTool/new-project-template.ts - 77 + 78 src/assets/wise5/services/notebookService.ts @@ -11831,7 +11862,7 @@ The branches will be removed but the steps will remain in the unit. reports src/assets/wise5/authoringTool/new-project-template.ts - 78 + 79 src/assets/wise5/services/notebookService.ts @@ -11842,78 +11873,78 @@ The branches will be removed but the steps will remain in the unit. Final Report src/assets/wise5/authoringTool/new-project-template.ts - 86 + 87 Final summary report of what you learned in this unit src/assets/wise5/authoringTool/new-project-template.ts - 87 + 88 Use this space to write your final report using evidence from your notebook. src/assets/wise5/authoringTool/new-project-template.ts - 88 + 89 <h3>This is a heading</h3><p>This is a paragraph.</p> src/assets/wise5/authoringTool/new-project-template.ts - 89 + 90 Teacher Notebook src/assets/wise5/authoringTool/new-project-template.ts - 97 + 98 teacher notes src/assets/wise5/authoringTool/new-project-template.ts - 119 + 120 src/assets/wise5/authoringTool/new-project-template.ts - 120 + 121 Teacher Notes src/assets/wise5/authoringTool/new-project-template.ts - 121 + 122 src/assets/wise5/authoringTool/new-project-template.ts - 128 + 129 Notes for the teacher as they're running the WISE unit src/assets/wise5/authoringTool/new-project-template.ts - 129 + 130 Use this space to take notes for this unit src/assets/wise5/authoringTool/new-project-template.ts - 130 + 131 <p>Use this space to take notes for this unit</p> src/assets/wise5/authoringTool/new-project-template.ts - 131 + 132 @@ -13399,282 +13430,85 @@ The branches will be removed but the steps will remain in the unit. 64 - - Expand all teams + + No feedback given for this version - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-class-responses/component-class-responses.component.html - 8,11 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-annotations/edit-component-annotations.component.html + 5,9 - - + Expand all + + Auto Comment - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-class-responses/component-class-responses.component.html - 14,18 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-annotations/edit-component-annotations.component.html + 85,87 - - - Collapse all teams - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-class-responses/component-class-responses.component.html - 18,21 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-annotations/edit-component-annotations.component.html + 138,140 - - - Collapse all + + Teacher Comment: - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-class-responses/component-class-responses.component.html - 24,28 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-comment/edit-component-comment.component.html + 2,4 - - Sort by team + + Enter comment here - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-class-responses/component-class-responses.component.html - 34,38 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-comment/edit-component-comment.component.html + 6,10 + + + Saved comment - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 47,50 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-comment/edit-component-comment.component.ts + 80 - - Team + + Auto Score - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-class-responses/component-class-responses.component.html - 37,38 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.html + 5,7 + + + Teacher Score: - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 50,52 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.html + 13,17 + + + Item Score: - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-details/milestone-details.component.html - 83,86 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.html + 15,21 + + + Saved score - src/assets/wise5/classroomMonitor/notebook-grading/notebook-grading.component.html - 52,54 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.ts + 70 + + + Create a new team - src/assets/wise5/classroomMonitor/student-progress/student-progress.component.ts - 40 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/manageStudents/add-team-button/add-team-button.component.html + 4,8 - - Sorty by completion + + New Team - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-class-responses/component-class-responses.component.html - 51,55 - - - - Status - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-class-responses/component-class-responses.component.html - 54,55 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 70,72 - - - src/assets/wise5/classroomMonitor/student-grading/student-grading.component.html - 81,83 - - - - Sort by score - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-class-responses/component-class-responses.component.html - 68,72 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html - 87,90 - - - src/assets/wise5/classroomMonitor/student-grading/student-grading.component.html - 97,100 - - - - Component Completion - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-grading-view/component-grading-view.component.html - 6,7 - - - - Show/hide team's work for this step - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-workgroup-item/component-workgroup-item.component.html - 11,14 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component.html - 11,13 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroup-item/workgroup-item.component.html - 12,14 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.html - 12,14 - - - - Not Assigned - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-workgroup-item/component-workgroup-item.component.ts - 65 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component.ts - 139 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroup-item/workgroup-item.component.ts - 99 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts - 91 - - - - Partially Completed - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-workgroup-item/component-workgroup-item.component.ts - 73 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component.ts - 147 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroup-item/workgroup-item.component.ts - 111 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts - 103 - - - - Not Completed - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-workgroup-item/component-workgroup-item.component.ts - 78 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-details/milestone-details.component.html - 109,113 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component.ts - 152 - - - - No Work - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-workgroup-item/component-workgroup-item.component.ts - 80 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component.ts - 154 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroup-item/workgroup-item.component.ts - 116 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts - 108 - - - - No feedback given for this version - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-annotations/edit-component-annotations.component.html - 5,9 - - - - Auto Comment - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-annotations/edit-component-annotations.component.html - 85,87 - - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-annotations/edit-component-annotations.component.html - 138,140 - - - - Teacher Comment: - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-comment/edit-component-comment.component.html - 2,4 - - - - Enter comment here - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-comment/edit-component-comment.component.html - 6,10 - - - - Saved comment - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-comment/edit-component-comment.component.ts - 80 - - - - Auto Score - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.html - 5,7 - - - - Teacher Score: - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.html - 13,17 - - - - Item Score: - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.html - 15,21 - - - - Saved score - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/edit-component-score/edit-component-score.component.ts - 70 - - - - Create a new team - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/manageStudents/add-team-button/add-team-button.component.html - 4,8 - - - - New Team - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/manageStudents/add-team-button/add-team-button.component.html - 9,12 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/manageStudents/add-team-button/add-team-button.component.html + 9,12 @@ -14071,6 +13905,40 @@ The branches will be removed but the steps will remain in the unit. 29,32 + + Sort by team + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html + 47,50 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html + 34,38 + + + + Team + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html + 50,52 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-details/milestone-details.component.html + 83,86 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html + 37,38 + + + src/assets/wise5/classroomMonitor/notebook-grading/notebook-grading.component.html + 52,54 + + + src/assets/wise5/classroomMonitor/student-progress/student-progress.component.ts + 40 + + Sort by completion @@ -14082,6 +13950,36 @@ The branches will be removed but the steps will remain in the unit. 78,81 + + Status + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html + 70,72 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html + 54,55 + + + src/assets/wise5/classroomMonitor/student-grading/student-grading.component.html + 81,83 + + + + Sort by score + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-class-responses/milestone-class-responses.component.html + 87,90 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html + 68,72 + + + src/assets/wise5/classroomMonitor/student-grading/student-grading.component.html + 97,100 + + Sort by score on Step @@ -14219,6 +14117,36 @@ The branches will be removed but the steps will remain in the unit. 77,79 + + Not Completed + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-details/milestone-details.component.html + 109,113 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component.ts + 152 + + + + Show/hide team's work for this step + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component.html + 11,13 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.html + 12,14 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroup-item/workgroup-item.component.html + 12,14 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.html + 12,14 + + Step @@ -14230,6 +14158,105 @@ The branches will be removed but the steps will remain in the unit. 92,93 + + Not Assigned + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component.ts + 139 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.ts + 132 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroup-item/workgroup-item.component.ts + 99 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts + 91 + + + + Partially Completed + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component.ts + 147 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.ts + 144 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroup-item/workgroup-item.component.ts + 111 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts + 103 + + + + No Work + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-workgroup-item/milestone-workgroup-item.component.ts + 154 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.ts + 149 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroup-item/workgroup-item.component.ts + 116 + + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/studentGrading/step-item/step-item.component.ts + 108 + + + + Showing / items + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/filter-components/filter-components.component.ts + 32 + + + + Expand all teams + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html + 8,11 + + + + + Expand all + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html + 14,18 + + + + Collapse all teams + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html + 18,21 + + + + - Collapse all + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html + 24,28 + + + + Sorty by completion + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-class-responses/node-class-responses.component.html + 51,55 + + Step Completion @@ -14251,22 +14278,23 @@ The branches will be removed but the steps will remain in the unit. 22,23 - - Question: + + Class Responses src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-grading/node-grading.component.html 28,31 - - - of - src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/select-component/select-component.component.html - 10,11 + src/assets/wise5/directives/summary-display/summary-display.component.ts + 412 Visited + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.ts + 139 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroup-item/workgroup-item.component.ts 106 @@ -14278,6 +14306,10 @@ The branches will be removed but the steps will remain in the unit. Not Visited + + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/node-workgroup-item/node-workgroup-item.component.ts + 151 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/nodeGrading/workgroup-item/workgroup-item.component.ts 118 @@ -14420,13 +14452,6 @@ The branches will be removed but the steps will remain in the unit. 34,35 - - Peer Groups - - src/assets/wise5/classroomMonitor/classroomMonitorComponents/peer-group-button/peer-group-button.component.html - 5,9 - - Groupings for @@ -19558,7 +19583,7 @@ Warning: This will delete all existing choices and buckets in this component. src/assets/wise5/components/match/match-student/match-student-default/match-student-default.component.ts - 470 + 471 src/assets/wise5/components/multipleChoice/multiple-choice-show-work/multiple-choice-show-work.component.html @@ -19589,7 +19614,7 @@ Warning: This will delete all existing choices and buckets in this component. src/assets/wise5/components/match/match-student/match-student-default/match-student-default.component.ts - 470 + 471 src/assets/wise5/components/multipleChoice/multiple-choice-show-work/multiple-choice-show-work.component.html @@ -19654,7 +19679,7 @@ Warning: This will delete all existing choices and buckets in this component.Correct bucket but wrong position src/assets/wise5/components/match/match-student/match-student-default/match-student-default.component.ts - 463 + 464 @@ -21494,13 +21519,6 @@ If this problem continues, let your teacher know and move on to the next activit 403 - - Class Responses - - src/assets/wise5/directives/summary-display/summary-display.component.ts - 412 - - Class Scores diff --git a/src/style/base/_base.scss b/src/style/base/_base.scss index 92f41061a43..bdaf9d4d2e0 100644 --- a/src/style/base/_base.scss +++ b/src/style/base/_base.scss @@ -6,10 +6,6 @@ strong, b, .strong { font-weight: 500; } -a { - text-decoration: underline; -} - figure { &.image { display: inline-block; diff --git a/src/style/styles.scss b/src/style/styles.scss index ab41980cc10..d3444be1cdd 100644 --- a/src/style/styles.scss +++ b/src/style/styles.scss @@ -46,6 +46,10 @@ @tailwind components; @tailwind utilities; +a { + text-decoration: underline; +} + .app-styles { @include apps.apps-setup(); }