Skip to content

Commit

Permalink
Merge branch 'release-5.17'
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokiterashima committed Oct 1, 2020
2 parents ab8faa1 + 56be67b commit a0cd3d9
Show file tree
Hide file tree
Showing 106 changed files with 12,058 additions and 14,384 deletions.
12 changes: 10 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"allowedCommonJsDependencies": [
"angular",
"jquery",
"rxjs/internal/BehaviorSubject",
"canvg",
"webfontloader",
"compute-covariance"
],
"aot": true,
"customWebpackConfig": {
"path": "./custom-webpack.config.js",
Expand Down Expand Up @@ -275,8 +283,8 @@
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
"src/main/webapp/site/src/tsconfig.app.json",
"src/main/webapp/site/src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
Expand Down
23,389 changes: 10,109 additions & 13,280 deletions package-lock.json

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wise",
"version": "5.16.3",
"version": "5.17.0",
"description": "Web-based Inquiry Science Environment",
"main": "app.js",
"browserslist": [
Expand All @@ -10,27 +10,27 @@
"not dead"
],
"dependencies": {
"@angular/animations": "^9.0.0",
"@angular/cdk": "^9.0.0",
"@angular/common": "^9.1.3",
"@angular/compiler": "^9.0.0",
"@angular/core": "^9.0.0",
"@angular/flex-layout": "^9.0.0-beta.29",
"@angular/forms": "^9.0.0",
"@angular/animations": "^10.1.2",
"@angular/cdk": "^10.2.1",
"@angular/common": "^10.1.2",
"@angular/compiler": "^10.1.2",
"@angular/core": "^10.1.2",
"@angular/flex-layout": "^10.0.0-beta.32",
"@angular/forms": "^10.1.2",
"@angular/localize": "~9.1.3",
"@angular/material": "^9.0.0",
"@angular/platform-browser": "^9.0.0",
"@angular/platform-browser-dynamic": "^9.0.0",
"@angular/router": "^9.0.0",
"@angular/upgrade": "^9.0.0",
"@angular/material": "^10.2.1",
"@angular/platform-browser": "^10.1.2",
"@angular/platform-browser-dynamic": "^10.1.2",
"@angular/router": "^10.1.2",
"@angular/upgrade": "^10.1.2",
"@stomp/stompjs": "^5.4.4",
"angular": "1.7.9",
"angular-animate": "1.7.8",
"angular-aria": "1.7.8",
"angular-dragula": "^1.2.6",
"angular-file-saver": "^1.1.3",
"angular-inview": "^2.1.0",
"angular-material": "^1.1.21",
"angular-material": "1.1.21",
"angular-mocks": "1.7.8",
"angular-moment": "^1.0.0-beta.6",
"angular-sanitize": "1.7.8",
Expand All @@ -50,7 +50,6 @@
"dom-autoscroller": "^2.3.4",
"eventemitter2": "^5.0.1",
"fabric": "^3.6.3",
"hammerjs": "^2.0.8",
"hopscotch": "^0.3.1",
"html2canvas": "^0.5.0-beta4",
"iframe-resizer": "^3.5.3",
Expand All @@ -59,7 +58,7 @@
"moment": "^2.24.0",
"ng-file-upload": "^12.0.4",
"ng-onload": "^0.8.0",
"ng-recaptcha": "^5.0.0",
"ng-recaptcha": "^6.0.0",
"ng-stomp": "^0.5.0",
"ngx-moment": "^3.5.0",
"oclazyload": "^1.0.9",
Expand All @@ -68,21 +67,22 @@
"summernote": "0.8.2",
"svg.draggable.js": "2.2.0",
"svg.js": "2.3.2",
"tslib": "^1.10.0",
"tslib": "^2.0.0",
"webfontloader": "^1.6.20",
"xmldom": "^0.1.31",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^9.0.0",
"@angular-devkit/build-angular": "~0.901.3",
"@angular/cli": "^9.1.3",
"@angular/compiler-cli": "^9.0.0",
"@angular/language-service": "^9.0.0",
"@angular-builders/custom-webpack": "^10.0.1",
"@angular-devkit/build-angular": "~0.1001.1",
"@angular/cli": "^10.1.1",
"@angular/compiler-cli": "^10.1.2",
"@angular/language-service": "^10.1.2",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@locl/cli": "0.0.1-beta.7",
"@ngtools/webpack": "~10.0.0",
"@types/dom-mediacapture-record": "^1.0.6",
"@types/jasmine": "^3.5.10",
"@types/jasminewd2": "^2.0.8",
Expand All @@ -105,27 +105,27 @@
"gulp-sourcemaps": "^2.6.5",
"html-webpack-plugin": "^3.2.0",
"html-webpack-template": "^6.2.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.4.1",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-babel-preprocessor": "^8.0.1",
"karma-chrome-launcher": "^2.2.0",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "^2.1.1",
"karma-jasmine": "^2.0.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-json-fixtures-preprocessor": "0.0.6",
"karma-parallel": "^0.3.1",
"karma-spec-reporter": "0.0.32",
"karma-typescript": "^4.1.1",
"karma-typescript": "^5.1.0",
"karma-webpack": "^4.0.2",
"moment-locales-webpack-plugin": "^1.2.0",
"ng-bullet": "^1.0.3",
"node-sass": "^4.14.1",
"prettier": "1.19.1",
"protractor": "^5.4.4",
"protractor": "~7.0.0",
"ts-loader": "^6.2.2",
"ts-node": "~8.2.0",
"tslint": "~5.17.0",
"typescript": "~3.8.3",
"tslint": "~6.1.0",
"typescript": "~3.9.0",
"webpack-bundle-analyzer": "^3.7.0",
"webpack-dev-server": "^3.10.3",
"webpack-merge": "^4.2.2",
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.16.3</version>
<version>5.17.0</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.16.3
5.17.0
1 change: 0 additions & 1 deletion src/main/webapp/site/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export function getAuthServiceConfigs(configService: ConfigService) {
anchorScrolling: 'enabled',
})
],
entryComponents: [ AnnouncementDialogComponent ],
providers: [
ConfigService,
StudentService,
Expand Down
14 changes: 0 additions & 14 deletions src/main/webapp/site/src/app/hybrid-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ export class EmptyComponent {}
UtilService,
VLEProjectService
],
entryComponents: [
],
exports: [
CommonModule,
FlexLayoutModule,
Expand All @@ -137,9 +135,6 @@ export class AngularJSModule {}
{ provide: ProjectService, useExisting: VLEProjectService },
VLEProjectService
],
entryComponents: [
PossibleScoreComponent
],
exports: [
CommonModule,
MatButtonModule,
Expand All @@ -155,9 +150,6 @@ export class StudentAngularJSModule {}
],
imports: [
StudentAngularJSModule
],
entryComponents: [
ChooseBranchPathDialogComponent
]
})
export class StudentVLEAngularJSModule {
Expand Down Expand Up @@ -197,12 +189,6 @@ export class PreviewAngularJSModule {
TeacherDataService,
TeacherProjectService,
TeacherWebSocketService
],
entryComponents: [
MilestoneReportDataComponent,
WorkgroupNodeScoreComponent,
ManageStudentsComponent,
NavItemScoreComponent
]
})
export class TeacherAngularJSModule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ const materialModules = [
ShareProjectDialogComponent,
CopyProjectDialogComponent
],
entryComponents: [
CommunityLibraryDetailsComponent,
CopyProjectDialogComponent,
LibraryProjectDetailsComponent,
OfficialLibraryDetailsComponent,
PersonalLibraryDetailsComponent,
ShareProjectDialogComponent
],
exports: [
HomePageProjectLibraryComponent,
ReactiveFormsModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { EventEmitter, OnInit, Output, QueryList, ViewChildren } from '@angular/core';
import { EventEmitter, OnInit, Output, QueryList, ViewChildren, Directive } from '@angular/core';
import { ProjectFilterValues } from '../../../domain/projectFilterValues';
import { LibraryService } from '../../../services/library.service';
import { Standard } from '../standard';
import { LibraryProject } from '../libraryProject';
import { PageEvent, MatPaginator } from '@angular/material/paginator';

@Directive()
export abstract class LibraryComponent implements OnInit {

projects: LibraryProject[] = [];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OnInit, Inject } from '@angular/core';
import { OnInit, Inject, Directive } from '@angular/core';
import { FormControl } from '@angular/forms';
import { BehaviorSubject, Observable } from 'rxjs';
import { TeacherService } from "../../../teacher/teacher.service";
Expand All @@ -7,6 +7,7 @@ import { MatSnackBar } from '@angular/material/snack-bar';
import { map, debounceTime } from 'rxjs/operators';
import { Project } from "../../../domain/project";

@Directive()
export abstract class ShareItemDialogComponent implements OnInit {

project: Project;
Expand Down
2 changes: 0 additions & 2 deletions src/main/webapp/site/src/app/preview/preview.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import { RouterModule } from '@angular/router';
],
declarations: [
],
entryComponents: [
],
providers: [
],
exports: [
Expand Down
12 changes: 5 additions & 7 deletions src/main/webapp/site/src/app/services/data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import { ProjectService } from '../../../../wise5/services/projectService';
providedIn: 'root'
})
export class DataService {

currentNode = null;
previousStep = null;
private currentNodeChangedSource: Subject<any> = new Subject<any>();
public currentNodeChanged$ = this.currentNodeChangedSource.asObservable();
private studentWorkReceivedSource: Subject<any> = new Subject<any>();
public studentWorkReceived$ = this.studentWorkReceivedSource.asObservable();

constructor(
protected upgrade: UpgradeModule,
Expand Down Expand Up @@ -74,11 +76,7 @@ export class DataService {
this.currentNodeChangedSource.next(previousAndCurrentNode);
}

endCurrentNode() {
if (this.currentNode != null) {
this.upgrade.$injector.get('$rootScope').$broadcast('exitNode',
{ nodeToExit: this.currentNode });
}
broadcastStudentWorkReceived(studentWork: any) {
this.studentWorkReceivedSource.next(studentWork);
}

}
37 changes: 37 additions & 0 deletions src/main/webapp/site/src/app/services/projectService.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe('ProjectService', () => {
shouldRetrieveProjectWhenConfigProjectURLIsValid();
shouldNotRetrieveProjectWhenConfigProjectURLIsUndefined();
shouldSaveProject();
shouldHandleSaveProjectResponse();
shouldNotSaveProjectWhenTheUserDoesNotHavePermissionToEditTheProject();
shouldGetDefaultThemePathWhenThemeIsNotDefinedInTheProject();
shouldGetProjectThemePathWhenThemeIsDefinedInTheProject();
Expand Down Expand Up @@ -220,6 +221,42 @@ function shouldSaveProject() {
});
}

function shouldHandleSaveProjectResponse() {
it('should broadcast project saved', () => {
shouldHandleSaveProjectResponseSuccessHelper('broadcastProjectSaved');
});
it('should broadcast not logged in project not saved', () => {
shouldHandleSaveProjectResponseErrorHelper('notSignedIn',
'broadcastNotLoggedInProjectNotSaved');
});
it('should broadcast not allowed to edit this project', () => {
shouldHandleSaveProjectResponseErrorHelper('notAllowedToEditThisProject',
'broadcastNotAllowedToEditThisProject');
});
it('should broadcast error saving project', () => {
shouldHandleSaveProjectResponseErrorHelper('errorSavingProject', 'broadcastErrorSavingProject');
});
}

function shouldHandleSaveProjectResponseSuccessHelper(functionName: any) {
shouldHandleSaveProjectResponseHelper('success', '', functionName);
}

function shouldHandleSaveProjectResponseErrorHelper(messageCode: string, functionName: any) {
shouldHandleSaveProjectResponseHelper('error', messageCode, functionName);
}

function shouldHandleSaveProjectResponseHelper(status: string, messageCode: string,
functionName: any) {
const response = {
status: status,
messageCode: messageCode
};
spyOn(service, functionName).and.callFake(() => {});
service.handleSaveProjectResponse(response);
expect(service[functionName]).toHaveBeenCalled();
}

function shouldNotSaveProjectWhenTheUserDoesNotHavePermissionToEditTheProject() {
it('should not save project when the user does not have permission to edit the project', () => {
service.setProject(scootersProjectJSON);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,6 @@ function shouldHandleSaveEventsToServerSuccess() {
expect(service.studentData.events[1].requestToken).toEqual(null);
expect(service.studentData.events[2].serverSaveTime).toEqual(3000);
expect(service.studentData.events[2].requestToken).toEqual(null);
expect($rootScope.$broadcast).toHaveBeenCalledWith('eventSavedToServer', jasmine.any(Object));
expect(service.saveToServerRequestCount).toEqual(0);
expect(service.updateNodeStatuses).toHaveBeenCalled();
expect(service.saveStudentStatus).toHaveBeenCalled();
Expand Down Expand Up @@ -1269,7 +1268,7 @@ function shouldHandleSaveAnnotationsToServerSuccess() {
createAnnotation(3, 'c', 3000)
]
};
spyOn($rootScope, '$broadcast');
spyOn(annotationService, 'broadcastAnnotationSavedToServer');
spyOn(service, 'updateNodeStatuses').and.callFake(() => {});
spyOn(service, 'saveStudentStatus').and.callFake(() => {
return new Promise(() => { return true })});
Expand All @@ -1281,8 +1280,7 @@ function shouldHandleSaveAnnotationsToServerSuccess() {
expect(service.studentData.annotations[1].requestToken).toEqual(null);
expect(service.studentData.annotations[2].serverSaveTime).toEqual(3000);
expect(service.studentData.annotations[2].requestToken).toEqual(null);
expect($rootScope.$broadcast).toHaveBeenCalledWith(
'annotationSavedToServer',
expect(annotationService.broadcastAnnotationSavedToServer).toHaveBeenCalledWith(
jasmine.any(Object)
);
expect(service.saveToServerRequestCount).toEqual(0);
Expand Down
4 changes: 0 additions & 4 deletions src/main/webapp/site/src/app/student/student.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ import { TeamSignInDialogComponent } from './team-sign-in-dialog/team-sign-in-di
EditProfileComponent,
TeamSignInDialogComponent
],
entryComponents: [
AddProjectDialogComponent,
TeamSignInDialogComponent
],
providers: [
AuthGuard
],
Expand Down
Loading

0 comments on commit a0cd3d9

Please sign in to comment.