Skip to content

Commit 7e55d70

Browse files
Merge branch 'release-5.20.2'
2 parents 2b7797b + ae58bfd commit 7e55d70

40 files changed

Lines changed: 433 additions & 748 deletions

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wise",
3-
"version": "5.20.1",
3+
"version": "5.20.2",
44
"description": "Web-based Inquiry Science Environment",
55
"main": "app.js",
66
"browserslist": [

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<artifactId>wise</artifactId>
3535
<packaging>war</packaging>
3636
<name>Web-based Inquiry Science Environment</name>
37-
<version>5.20.1</version>
37+
<version>5.20.2</version>
3838
<url>http://wise5.org</url>
3939
<licenses>
4040
<license>

scripts/beforeInstall.sh

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ systemctl daemon-reload
5656
echo "Add https to Tomcat server.xml"
5757
sed 's/<Connector port="8080"/<Connector port="8080" scheme="https"/' -i $CATALINA_HOME/conf/server.xml
5858

59-
echo "Downlading setenv.sh Tomcat file"
59+
echo "Copying setenv.sh file to Tomcat bin folder"
6060
cp $BUILD_FILES/setenv.sh /usr/share/tomcat9/bin/setenv.sh
6161

6262
echo "Restarting Tomcat"
@@ -72,7 +72,13 @@ apt-get install nginx -y
7272
echo "Adding Nginx www-data user to tomcat group"
7373
usermod -a -G tomcat www-data
7474

75-
echo "Downloading WISE Nginx config file"
75+
echo "Adding ip to nginx.conf"
76+
sed 's/http {/http {\n add_header ip $server_addr;/' -i /etc/nginx/nginx.conf
77+
78+
echo "Adding gzip_types to nginx.conf"
79+
sed 's/gzip on;/gzip on;\n gzip_types text\/plain text\/xml image\/gif image\/jpeg image\/png image\/svg+xml application\/json application\/javascript application\/x-javascript text\/javascript text\/css;/' -i /etc/nginx/nginx.conf
80+
81+
echo "Copying WISE Nginx config file to Nginx sites-enabled folder"
7682
rm -f /etc/nginx/sites-enabled/*
7783
cp $BUILD_FILES/$env/wise.conf /etc/nginx/sites-enabled/wise.conf
7884
systemctl restart nginx
@@ -82,7 +88,7 @@ mkdir -p $HOME/build-folder/WEB-INF/classes
8288
sudo -u ubuntu -g ubuntu mkdir $HOME/backup
8389
sudo -u ubuntu -g tomcat mkdir $HOME/googleTokens
8490

85-
echo "Downloading application.properties file"
91+
echo "Copying application.properties file to the build folder"
8692
cp $BUILD_FILES/$env/application.properties $BUILD_DIR/WEB-INF/classes/application.properties
8793

8894
echo "Installing network drive package"
@@ -92,16 +98,24 @@ echo "Mounting network drive folders"
9298
cp $BUILD_FILES/$env/fstab /etc/fstab
9399
mount -a
94100

95-
echo "Downloading .vimrc file"
101+
echo "Copying .vimrc file to the ubuntu home folder"
96102
sudo -u ubuntu -g ubuntu cp $BUILD_FILES/.vimrc $HOME/.vimrc
97103

98-
echo "Downloading text to append to .bashrc"
104+
echo "Appending text to .bashrc"
99105
cat $BUILD_FILES/append-to-bashrc.txt >> ~/.bashrc
106+
cat $BUILD_FILES/$env/append-to-bashrc.txt >> ~/.bashrc
100107
source ~/.bashrc
101108

109+
echo "Copying message of the day file to update-motd.d folder to display notes on login"
110+
cp $BUILD_FILES/99-notes /etc/update-motd.d/99-notes
111+
cat $BUILD_FILES/$env/append-to-99-notes.txt >> /etc/update-motd.d/99-notes
112+
chmod 755 /etc/update-motd.d/99-notes
113+
114+
echo "Install mysql client"
115+
apt-get install mysql-client-core-8.0 -y
116+
117+
echo "Install redis client"
118+
apt-get install redis-tools -y
119+
102120
echo "Installing tree"
103121
apt-get install tree -y
104-
105-
echo "Downloading message of the day script to display notes"
106-
cp $BUILD_FILES/99-notes /etc/update-motd.d/99-notes
107-
chmod 755 /etc/update-motd.d/99-notes

src/main/resources/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.20.1
1+
5.20.2
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<mat-select *ngIf="components.length > 1"
2+
class="md-no-underline md-button mat-button-raised md-raised"
3+
[(ngModel)]="selectedComponents"
4+
(selectionChange)="selectedComponentsChange()"
5+
placeholder="{{getSelectedText()}}"
6+
multiple>
7+
<mat-select-trigger>{{getSelectedText()}}</mat-select-trigger>
8+
<mat-optgroup label="Assessment items to show" i18n-label>
9+
<mat-option value="{{component.id}}" *ngFor="let component of components; let i = index">
10+
{{ i+1 }}: {{ getComponentTypeLabel(component.type) }}
11+
</mat-option>
12+
</mat-optgroup>
13+
</mat-select>
14+
<button mat-button class="md-body-1 mat-button-raised"
15+
*ngIf="components.length == 1"
16+
aria-label="Assessment items to show"
17+
i18n-aria-label
18+
disabled
19+
i18n>
20+
1 assessment item
21+
</button>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
mat-select {
2+
min-width: 150px;
3+
}
4+
5+
mat-select, mat-select-trigger {
6+
text-transform: none;
7+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { Component, EventEmitter, Input, Output } from "@angular/core";
2+
import { UpgradeModule } from "@angular/upgrade/static";
3+
import { TeacherProjectService } from "../../../../../wise5/services/teacherProjectService";
4+
import { UtilService } from "../../../../../wise5/services/utilService";
5+
6+
@Component({
7+
selector: 'component-select',
8+
styleUrls: ['component-select.component.scss'],
9+
templateUrl: 'component-select.component.html'
10+
})
11+
export class ComponentSelectComponent {
12+
13+
components: any[];
14+
15+
@Output()
16+
modelChange: EventEmitter<any> = new EventEmitter<any>();
17+
18+
@Input()
19+
nodeId: string;
20+
21+
selectedComponents: any[];
22+
23+
constructor(private upgrade: UpgradeModule, private ProjectService: TeacherProjectService,
24+
private UtilService: UtilService) {
25+
}
26+
27+
ngOnInit() {
28+
this.components = this.ProjectService.getComponentsByNodeId(this.nodeId).filter(component => {
29+
return this.ProjectService.componentHasWork(component);
30+
});
31+
this.selectedComponents = this.components.map(component => {
32+
return component.id;
33+
});
34+
}
35+
36+
getComponentTypeLabel(componentType) {
37+
return this.UtilService.getComponentTypeLabel(componentType);
38+
}
39+
40+
getSelectedText() {
41+
let nComponents = this.components.length;
42+
return this.upgrade.$injector.get('$filter')('translate')('selectedComponentsLabel', {
43+
selected: this.selectedComponents.length,
44+
total: nComponents
45+
});
46+
}
47+
48+
selectedComponentsChange() {
49+
const hiddenComponents = [];
50+
for (const component of this.components) {
51+
const id = component.id;
52+
if (this.selectedComponents.indexOf(id) < 0) {
53+
hiddenComponents.push(id);
54+
}
55+
}
56+
this.modelChange.emit(hiddenComponents);
57+
}
58+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<div class="view-content view-content--with-sidemenu">
2+
<div class="l-constrained">
3+
<div fxLayout="row wrap" fxLayoutAlign="center center" fxLayoutAlign.gt-xs="start center">
4+
<mat-card *ngFor="let milestone of milestones"
5+
class="milestone md-button" md-ink-ripple
6+
(click)="showMilestoneDetails(milestone, $event)">
7+
<mat-card-content fxLayout="column" fxLayoutAlign="center center">
8+
<div class="milestone__title" md-truncate>{{ milestone.name }}</div>
9+
<div class="milestone__progress">
10+
<mat-progress-spinner diameter="96"
11+
mode="determinate"
12+
[value]="milestone.percentageCompleted"
13+
[ngClass]="{ 'success': milestone.percentageCompleted === 100 }"></mat-progress-spinner>
14+
<div class="milestone__progress__percent" fxLayout="row" fxLayoutAlign="center center">
15+
<span *ngIf="milestone.percentageCompleted < 100">{{ milestone.percentageCompleted }}%</span>
16+
<mat-icon *ngIf="milestone.percentageCompleted === 100" class="success md-48"> check </mat-icon>
17+
</div>
18+
</div>
19+
<p class="md-body-1 text-secondary">{{ milestone.numberOfStudentsCompleted }}/{{ milestone.numberOfStudentsInRun }} teams completed</p>
20+
<p *ngIf="milestone.isReportAvailable" class="md-body-2 info" i18n>~ Report Available ~</p>
21+
</mat-card-content>
22+
</mat-card>
23+
</div>
24+
</div>
25+
</div>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:host ::ng-deep .success circle {
2+
stroke: #00C853;
3+
}

0 commit comments

Comments
 (0)