Skip to content

Commit

Permalink
Merge branch 'release-5.18.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokiterashima committed Nov 5, 2020
2 parents 8539b08 + 38a7cf2 commit a5d00d2
Show file tree
Hide file tree
Showing 49 changed files with 556 additions and 628 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wise",
"version": "5.18.1",
"version": "5.18.2",
"description": "Web-based Inquiry Science Environment",
"main": "app.js",
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<artifactId>wise</artifactId>
<packaging>war</packaging>
<name>Web-based Inquiry Science Environment</name>
<version>5.18.1</version>
<version>5.18.2</version>
<url>http://wise5.org</url>
<licenses>
<license>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.18.1
5.18.2
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import { Component, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FlexLayoutModule } from '@angular/flex-layout';

import { createStudentAngularJSModule } from '../../../wise5/vle/student-angular-js-module';
import { createTeacherAngularJSModule } from '../../../wise5/teacher/teacher-angular-js-module';
import { UpgradeModule } from '@angular/upgrade/static';
import { setUpLocationSync } from '@angular/router/upgrade';
import { UtilService } from '../../../wise5/services/utilService';
import { ConfigService } from '../../../wise5/services/configService';
import { ProjectService } from '../../../wise5/services/projectService';
Expand All @@ -15,20 +12,12 @@ import { SessionService } from '../../../wise5/services/sessionService';
import { StudentAssetService } from '../../../wise5/services/studentAssetService';
import { TagService } from '../../../wise5/services/tagService';
import { AudioRecorderService } from '../../../wise5/services/audioRecorderService';
import { PossibleScoreComponent } from './possible-score/possible-score.component';
import { AnnotationService } from '../../../wise5/services/annotationService';
import { CommonModule } from '@angular/common';
import { StudentWebSocketService } from '../../../wise5/services/studentWebSocketService';
import { StudentDataService } from '../../../wise5/services/studentDataService';
import { AchievementService } from '../../../wise5/services/achievementService';
import { MilestoneReportDataComponent } from './teacher/milestone/milestone-report-data/milestone-report-data.component';
import { TeacherProjectService } from '../../../wise5/services/teacherProjectService';
import { ProjectAssetService } from './services/projectAssetService';
import { SpaceService } from '../../../wise5/services/spaceService';
import { StudentStatusService } from '../../../wise5/services/studentStatusService';
import { SummaryService } from '../../../wise5/components/summary/summaryService';
import { TeacherDataService } from '../../../wise5/services/teacherDataService';
import { TeacherWebSocketService } from '../../../wise5/services/teacherWebSocketService';
import { TableService } from '../../../wise5/components/table/tableService';
import { NotebookService } from '../../../wise5/services/notebookService';
import { NotificationService } from '../../../wise5/services/notificationService';
Expand All @@ -38,10 +27,8 @@ import { MultipleChoiceService } from '../../../wise5/components/multipleChoice/
import { OpenResponseService } from '../../../wise5/components/openResponse/openResponseService';
import { NodeService } from '../../../wise5/services/nodeService';
import { MatDialogModule } from '@angular/material/dialog';
import { ChooseBranchPathDialogComponent } from './preview/modules/choose-branch-path-dialog/choose-branch-path-dialog.component';
import { MatButtonModule } from '@angular/material/button';
import { MatListModule } from '@angular/material/list';
import { DataService } from './services/data.service';
import { DiscussionService } from '../../../wise5/components/discussion/discussionService';
import { DrawService } from '../../../wise5/components/draw/drawService';
import { EmbeddedService } from '../../../wise5/components/embedded/embeddedService';
Expand All @@ -50,34 +37,25 @@ import { LabelService } from '../../../wise5/components/label/labelService';
import { AnimationService } from '../../../wise5/components/animation/animationService';
import { AudioOscillatorService } from '../../../wise5/components/audioOscillator/audioOscillatorService';
import { ConceptMapService } from '../../../wise5/components/conceptMap/conceptMapService';
import { MilestoneService } from '../../../wise5/services/milestoneService';
import { GraphService } from '../../../wise5/components/graph/graphService';
import { WorkgroupNodeScoreComponent } from '../../../wise5/classroomMonitor/classroomMonitorComponents/shared/workgroupNodeScore/workgroup-node-score.component';
import { NavItemScoreComponent } from '../../../wise5/classroomMonitor/classroomMonitorComponents/nodeProgress/navItemScore/nav-item-score.component';
import { NodeIconComponent } from '../../../wise5/classroomMonitor/classroomMonitorComponents/shared/nodeIcon/node-icon.component';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatTooltipModule } from '@angular/material/tooltip';
import { ManageStudentsComponent } from '../../../wise5/classroomMonitor/manageStudents/manage-students-component';
import { AdvancedProjectAuthoringComponent } from '../../../wise5/authoringTool/advanced/advanced-project-authoring.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatSelectModule } from '@angular/material/select';
import { ChooseNewComponent } from './authoring-tool/add-component/choose-new-component/choose-new-component.component';
import { ChooseNewComponentLocation } from './authoring-tool/add-component/choose-new-component-location/choose-new-component-location.component';
import { ChooseImportStepComponent } from './authoring-tool/import-step/choose-import-step/choose-import-step.component';
import { ChooseImportStepLocationComponent } from './authoring-tool/import-step/choose-import-step-location/choose-import-step-location.component';
import { ComponentNewWorkBadgeComponent } from './classroom-monitor/component-new-work-badge/component-new-work-badge.component';
import { StatusIconComponent } from './classroom-monitor/status-icon/status-icon.component';
import { HelpIconComponent } from '../../../wise5/themes/default/themeComponents/helpIcon/help-icon.component';

@Component({template: ``})
export class EmptyComponent {}

@NgModule({
declarations: [
EmptyComponent,
HelpIconComponent,
NodeIconComponent,
],
imports: [
Expand Down Expand Up @@ -152,95 +130,3 @@ export class EmptyComponent {}
]
})
export class AngularJSModule {}

@NgModule({
declarations: [
PossibleScoreComponent
],
imports: [
AngularJSModule
],
providers: [
{ provide: DataService, useExisting: StudentDataService },
{ provide: ProjectService, useExisting: VLEProjectService },
VLEProjectService
],
exports: [
CommonModule,
MatButtonModule,
MatDialogModule,
MatListModule
]
})
export class StudentAngularJSModule {}

@NgModule({
declarations: [
ChooseBranchPathDialogComponent
],
imports: [
StudentAngularJSModule
]
})
export class StudentVLEAngularJSModule {
constructor(upgrade: UpgradeModule) {
bootstrapAngularJSModule(upgrade, 'vle');
}
}

@NgModule({
imports: [
StudentAngularJSModule
]
})
export class PreviewAngularJSModule {
constructor(upgrade: UpgradeModule) {
bootstrapAngularJSModule(upgrade, 'preview');
}
}

@NgModule({
declarations: [
AdvancedProjectAuthoringComponent,
ChooseImportStepComponent,
ChooseImportStepLocationComponent,
ChooseNewComponent,
ChooseNewComponentLocation,
ComponentNewWorkBadgeComponent,
ManageStudentsComponent,
MilestoneReportDataComponent,
StatusIconComponent,
WorkgroupNodeScoreComponent,
NavItemScoreComponent
],
imports: [
AngularJSModule
],
providers: [
{ provide: DataService, useExisting: TeacherDataService },
MilestoneService,
ProjectAssetService,
SpaceService,
StudentStatusService,
{ provide: ProjectService, useExisting: TeacherProjectService },
TeacherDataService,
TeacherProjectService,
TeacherWebSocketService
]
})
export class TeacherAngularJSModule {
constructor(upgrade: UpgradeModule) {
bootstrapAngularJSModule(upgrade, 'teacher');
}
}

function bootstrapAngularJSModule(upgrade: UpgradeModule, moduleType: string) {
let module;
if (moduleType === 'teacher') {
module = createTeacherAngularJSModule();
} else {
module = createStudentAngularJSModule(moduleType);
}
upgrade.bootstrap(document.body, [module.name]);
setUpLocationSync(upgrade);
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h3 i18n>Using a WISE Unit</h3>
<p class="indented-text" i18n>Here are instructions on how to set up a Run.</p>
<ol>
<li i18n>Sign in to WISE with your teacher account.</li>
<li i18n>Click the "Browse WISE Units" tab.</li>
<li i18n>Click the "Unit Library" tab.</li>
<li i18n>Find a project that you would like to use with your class.</li>
<li i18n>Click on the project to open the information for the project.</li>
<li i18n>Click the "Use With Class" button.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h3 i18n>How do I create an account?</h3>
<h3 i18n>How do I use a unit with my class?</h3>
<ol>
<li i18n>Sign in to WISE with your teacher account.</li>
<li i18n>Click the "Browse WISE Units" tab.</li>
<li i18n>Click the "Unit Library" tab.</li>
<li i18n>Find a project that you would like to use with your class.</li>
<li i18n>Click on the project to open the information for the project.</li>
<li i18n>Click the "Use With Class" button.</li>
Expand Down Expand Up @@ -107,7 +107,7 @@ <h3 i18n>Can I shorten a project run to 1 or 2 days?</h3>
<h3 i18n>Where do I find out about lesson plans and standards for WISE projects?</h3>
<ul>
<li i18n>Sign into WISE with your teacher account.</li>
<li i18n>Click the "Browse WISE Units" tab.</li>
<li i18n>Click the "Unit Library" tab.</li>
<li i18n>Find a project you would like to learn about.</li>
<li i18n>Click on the project.</li>
<li i18n>This will display a popup that displays information about the project.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</div>
</div>
<span fxFlex></span>
<app-library-project-menu *ngIf="isTeacher && !isRunProject && project.wiseVersion !== 4"
[project]="project"></app-library-project-menu>
<app-library-project-menu *ngIf="isTeacher && project.wiseVersion !== 4" [project]="project"
[isRun]="isRunProject"></app-library-project-menu>
</div>
<div class="info-block">
<div class="library-project-details__info">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
</button>
<mat-menu #projectMenu="matMenu" xPosition="before">
<div class="header-account-menu">
<a mat-menu-item disabled *ngIf="isChild">
<ng-container i18n>Parent ID:</ng-container> {{ project.parentId }}
</a>
<ng-container *ngIf="isChild">
<div class="menu-info secondary-text" i18n>Parent ID: {{ project.parentId }}</div>
<mat-divider></mat-divider>
</ng-container>
<a mat-menu-item (click)="copyProject()">
<mat-icon>content_copy</mat-icon> <ng-container i18n>Copy</ng-container>
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//.project-info {
// margin: 0 16px;
// font-weight: 500;
//}
.menu-info {
margin: 0 16px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export class LibraryProjectMenuComponent implements OnInit {
@Input()
project: Project;

@Output('menuAction')
select: EventEmitter<string> = new EventEmitter<string>();
@Input()
isRun: boolean;

editLink: string = '';
previewLink: string = '';
Expand All @@ -35,7 +35,7 @@ export class LibraryProjectMenuComponent implements OnInit {

ngOnInit() {
this.isCanEdit = this.isOwner() || this.isSharedOwnerWithEditPermission();
this.isCanShare = this.isOwner();
this.isCanShare = this.isOwner() && !this.isRun;
this.editLink = `${this.configService.getContextPath()}/teacher/edit/unit/${this.project.id}`;
this.isChild = this.project.isChild();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@ export class LibraryPaginatorIntl extends MatPaginatorIntl {
nextPageLabel = $localize`Next page`;
previousPageLabel = $localize`Previous page`;

constructor() {
super();
}

getRangeLabel = function (page, pageSize, length) {
if (length == 0 || pageSize == 0) {
return $localize`0 of ${length}:total:`;
}
length = Math.max(length, 0);
const startIndex = page * pageSize;
const endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;
const startIndex = page * pageSize + 1;
const endIndex = startIndex < length ? Math.min(startIndex + pageSize - 1, length) : startIndex + pageSize - 1;
return $localize`${startIndex}:start: - ${endIndex}:end: of ${length}:total:`;
};
}
2 changes: 1 addition & 1 deletion src/main/webapp/site/src/app/preview/preview.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { RouterModule } from '@angular/router';
{
path: 'preview',
children: [
{path: '', loadChildren: () => import('../hybrid-module').then(m => m.PreviewAngularJSModule)}
{path: '', loadChildren: () => import('../student-hybrid-angular.module').then(m => m.PreviewAngularJSModule)}
]
}
])
Expand Down
68 changes: 68 additions & 0 deletions src/main/webapp/site/src/app/student-hybrid-angular.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { NgModule } from '@angular/core';

import { createStudentAngularJSModule} from '../../../wise5/vle/student-angular-js-module';
import { UpgradeModule } from '@angular/upgrade/static';
import { setUpLocationSync } from '@angular/router/upgrade';
import { ProjectService } from '../../../wise5/services/projectService';
import { VLEProjectService } from '../../../wise5/vle/vleProjectService';
import { PossibleScoreComponent } from './possible-score/possible-score.component';
import { CommonModule } from '@angular/common';
import { StudentDataService } from '../../../wise5/services/studentDataService';
import { MatDialogModule } from '@angular/material/dialog';
import { ChooseBranchPathDialogComponent } from './preview/modules/choose-branch-path-dialog/choose-branch-path-dialog.component';
import { MatButtonModule } from '@angular/material/button';
import { MatListModule } from '@angular/material/list';
import { DataService } from './services/data.service';
import { AngularJSModule } from './common-hybrid-angular.module';

@NgModule({
declarations: [
PossibleScoreComponent
],
imports: [
AngularJSModule
],
providers: [
{ provide: DataService, useExisting: StudentDataService },
{ provide: ProjectService, useExisting: VLEProjectService },
VLEProjectService
],
exports: [
CommonModule,
MatButtonModule,
MatDialogModule,
MatListModule
]
})
export class StudentAngularJSModule {}

@NgModule({
declarations: [
ChooseBranchPathDialogComponent
],
imports: [
StudentAngularJSModule
]
})
export class StudentVLEAngularJSModule {
constructor(upgrade: UpgradeModule) {
bootstrapAngularJSModule(upgrade, 'vle');
}
}

@NgModule({
imports: [
StudentAngularJSModule
]
})
export class PreviewAngularJSModule {
constructor(upgrade: UpgradeModule) {
bootstrapAngularJSModule(upgrade, 'preview');
}
}

function bootstrapAngularJSModule(upgrade: UpgradeModule, moduleType: string) {
createStudentAngularJSModule(moduleType);
upgrade.bootstrap(document.body, [moduleType]);
setUpLocationSync(upgrade);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const studentRoutes: Routes = [
{ path: 'home', component: StudentHomeComponent, pathMatch: 'full' },
{ path: 'profile', redirectTo: '', pathMatch: 'full' },
{ path: 'profile/edit', component: EditComponent },
{path: '', loadChildren: () => import('../hybrid-module').then(m => m.StudentVLEAngularJSModule)}
{path: '', loadChildren: () => import('../student-hybrid-angular.module').then(m => m.StudentVLEAngularJSModule)}
]
}
];
Expand Down
Loading

0 comments on commit a5d00d2

Please sign in to comment.