Skip to content

Commit

Permalink
Merge branch 'release-5.15.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokiterashima committed Aug 29, 2020
2 parents 5eb1685 + f6f727e commit b858e2a
Show file tree
Hide file tree
Showing 28 changed files with 314 additions and 195 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.15.0",
"version": "5.15.1",
"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.15.0</version>
<version>5.15.1</version>
<url>http://wise5.org</url>
<licenses>
<license>
Expand Down
283 changes: 173 additions & 110 deletions src/main/java/org/wise/vle/web/wise5/StudentDataController.java

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.15.0
5.15.1
12 changes: 6 additions & 6 deletions src/main/webapp/portal/admin/account/manageusers.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ a:hover {
<tr>
<td>${username}</td>
<td><a target='_blank' href='../../teacher/management/changepassword.html?username=${username}'><spring:message code="changePassword" /></a></td>
<td><a href="${contextPath}/login/impersonate?username=${username}"><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a onclick='impersonateUser("${username}")'><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a target='_blank' href='../../teacher/account/info?username=${username}'><spring:message code="info" /></a></td>
<td><a target='_blank' href='manageuserroles.html?username=${username}'><spring:message code="admin.index.manageUserRoles" /></a></td>
</tr>
Expand All @@ -88,7 +88,7 @@ a:hover {
<tr>
<td>${username}</td>
<td><a target='_blank' href='../../teacher/management/changepassword.html?username=${username}'><spring:message code="changePassword" /></a></td>
<td><a href="${contextPath}/login/impersonate?username=${username}"><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a onclick='impersonateUser("${username}")'><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a target='_blank' href='../../student/account/info?username=${username}'><spring:message code="info" /></a></td>
</tr>
</c:forEach>
Expand All @@ -113,7 +113,7 @@ a:hover {
</c:choose>
<td>${username}</td>
<td><a target='_blank' href='../../teacher/management/changepassword.html?username=${username}'><spring:message code="changePassword" /></a></td>
<td><a href="${contextPath}/login/impersonate?username=${username}"><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a onclick='impersonateUser("${username}")'><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a target='_blank' href='../../teacher/account/info?username=${username}'><spring:message code="info" /></a></td>
<td>${user.userDetails.schoolname},${user.userDetails.city},${user.userDetails.state},${user.userDetails.country}</td>
</tr>
Expand All @@ -135,7 +135,7 @@ a:hover {
</c:choose>
<td>${username}</td>
<td><a target='_blank' href='../../teacher/management/changepassword.html?username=${username}'><spring:message code="changePassword" /></a></td>
<td><a href="${contextPath}/login/impersonate?username=${username}"><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a onclick='impersonateUser("${username}")'><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a target='_blank' href='../../student/account/info?username=${username}'><spring:message code="info" /></a></td>
</tr>
</c:forEach>
Expand All @@ -150,7 +150,7 @@ a:hover {
<tr>
<td>${username}</td>
<td><a target='_blank' href='../../teacher/management/changepassword.html?username=${username}'><spring:message code="changePassword" /></a></td>
<td><a href="${contextPath}/login/impersonate?username=${username}"><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a onclick='impersonateUser("${username}")'><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a target='_blank' href='../../teacher/account/info?username=${username}'><spring:message code="info" /></a></td>
<td><a target='_blank' href='manageuserroles.html?username=${username}'><spring:message code="admin.index.manageUserRoles" /></a></td>
</tr>
Expand All @@ -164,7 +164,7 @@ a:hover {
<tr>
<td>${username}</td>
<td><a target='_blank' href='../../teacher/management/changepassword.html?username=${username}'><spring:message code="changePassword" /></a></td>
<td><a href="${contextPath}/login/impersonate?username=${username}"><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a onclick='impersonateUser("${username}")'><spring:message code="admin.account.manageusers.logInAsThisUser" /></a></td>
<td><a target='_blank' href='../../student/account/info?username=${username}'><spring:message code="info" /></a></td>
</tr>
</c:forEach>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<c:if test="${textDirection == 'rtl' }">
<link href="${contextPath}/<spring:theme code="rtlstylesheet"/>" rel="stylesheet" type="text/css" >
</c:if>

<script type="text/javascript" src="${contextPath}/<spring:theme code="jquerysource"/>"></script>
<script src="${contextPath}/<spring:theme code="superfishsource"/>" type="text/javascript"></script>
<script src="${contextPath}/<spring:theme code="generalsource" />" type="text/javascript"></script>

Expand Down Expand Up @@ -49,7 +49,7 @@ table, tr, td {
items="${projectsToAuthor.value}"
varStatus="loopStatus">
<c:out value="${username}" /> |
<a href="../../login/impersonate?username=${username}">Log in as this user</a> |
<a onclick='impersonateUser("${username}")'>Log in as this user</a> |
<a target='_blank' href='../../teacher/account/info?username=${username}'>info</a>
<c:if test="${!loopStatus.isLast()}"><br/></c:if>
</c:forEach>
Expand Down
5 changes: 3 additions & 2 deletions src/main/webapp/portal/admin/run/stats.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<script src="${contextPath}/<spring:theme code="jquerysource"/>" type="text/javascript"></script>
<script src="${contextPath}/<spring:theme code="superfishsource"/>" type="text/javascript"></script>
<script src="${contextPath}/<spring:theme code="generalsource" />" type="text/javascript"></script>

<style>
th {
Expand Down Expand Up @@ -49,7 +50,7 @@ th {
<td>${run.id} (${run.runcode})</td>
<td>${run.name} (${run.project.wiseVersion})</td>
<td>
<a href="${contextPath}/login/impersonate?username=${run.owner.userDetails.username}">${run.owner.userDetails.username}</a><br/>
<a onclick='impersonateUser("${run.owner.userDetails.username}")'>${run.owner.userDetails.username}</a><br/>
(${run.owner.userDetails.schoolname}, ${run.owner.userDetails.city}, ${run.owner.userDetails.state},${run.owner.userDetails.country})
</td>
<c:if test="${period!=null}">
Expand All @@ -72,4 +73,4 @@ th {

</div>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion src/main/webapp/portal/headermain.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</a>
</sec:authorize>
<sec:authorize access="hasRole('ROLE_PREVIOUS_ADMINISTRATOR')">
<a id="logOutImpersonator" href="${contextPath}/logout/impersonate">
<a id="logOutImpersonator" onclick='switchBackToOriginalUser()'>
<spring:message code="accountmenu.switchBackToOriginalUser" />
</a>
</sec:authorize>
Expand Down
9 changes: 9 additions & 0 deletions src/main/webapp/portal/javascript/general.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function impersonateUser(username) {
$(`<form style="visibility:hidden" action="/login/impersonate" method="POST"><input name="username" value="${username}"/></form>`)
.appendTo('body').submit();
}

function switchBackToOriginalUser() {
$(`<form style="visibility:hidden" action="/logout/impersonate" method="POST"></form>`)
.appendTo('body').submit();
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
</div>
<div *ngIf="isPreviousAdmin" class="user-switch">
<a (click)="switchToOriginalUser()" i18n>Switch back to original user</a>
<form id="switchBackToOriginalUserForm"
action="/logout/impersonate"
method="POST"></form>
</div>
<mat-divider></mat-divider>
<a *ngIf="role === 'student'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,12 @@
.user-switch {
margin: 0 16px;
font-size: 12px;

a {
cursor: pointer;
}

form {
visibility: hidden;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class HeaderAccountMenuComponent implements OnInit {
}

switchToOriginalUser() {
window.location.href = '/logout/impersonate';
(<HTMLFormElement> document.getElementById('switchBackToOriginalUserForm')).submit();
}

logOut() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ <h3 i18n>3. Set Schedule</h3>
</mat-dialog-content>
<mat-dialog-actions fxLayoutAlign="end">
<button mat-button color="primary" (click)="checkClassroomAuthorization()"
*ngIf="isGoogleUser() && isGoogleClassroomEnabled()" i18n>Add to Google
Classroom</button>
*ngIf="isGoogleUser() && isGoogleClassroomEnabled()" i18n>
Share to Google Classroom
</button>
<button mat-button (click)="closeAll()" i18n>Done</button>
</mat-dialog-actions>
</ng-container>
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
fxLayoutAlign="start center"
fxLayoutGap="8px">
<mat-icon svgIcon="google-classroom"></mat-icon>
<span i18n>Add to Google Classroom</span>
<span i18n>Share to Google Classroom</span>
</h2>
<ng-container *ngIf="!courses.length">
<mat-dialog-content>
<div class="info-block">
<p i18n>Hey there! Looks like you don't have any active Google classes.</p>
<p i18n>Hey there! Looks like you don't have any active Google Classroom classes.</p>
<p i18n>Visit <a href="https://classroom.google.com" target="_blank">Google Classroom</a> to create a class and try again.</p>
</div>
</mat-dialog-content>
Expand All @@ -22,8 +22,8 @@
<p class="mat-subheading-1 accent-1">
{{ data.run.name }} <span class="mat-caption" i18n>(Run ID: {{ data.run.id }})</span>
</p>
<p i18n>Add an assignment for this unit in Google Classroom.</p>
<h3 i18n>1. Choose Google Class</h3>
<p i18n>Add an assignment for this unit to Google Classroom.</p>
<h3 i18n>1. Choose from your Google Classroom classes</h3>
<div formArrayName="selectedCourses">
<p *ngFor="let control of selectedCoursesControl.controls; let i = index">
<mat-checkbox [formControl]="control">
Expand Down Expand Up @@ -61,12 +61,12 @@ <h3 i18n>2. Add Description</h3>
</p>
<div *ngIf="addSuccessCount > 0">
<br/>
<p i18n>The unit has been successfully added to the following Google Classroom(s)</p>
<p i18n>The unit has been successfully added to the following Google Classroom classes:</p>
<p *ngFor="let course of coursesSuccessfullyAdded">{{ course.name }}</p>
</div>
<div *ngIf="addFailureCount > 0" style="color: red">
<br/>
<p i18n>There was a problem trying to add the unit to the following Google Classroom(s)</p>
<p i18n>There was a problem adding the unit to the following Google Classroom classes:</p>
<p *ngFor="let course of coursesFailedToAdd">{{ course.name }}</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<a mat-menu-item (click)="checkClassroomAuthorization()"
*ngIf="isGoogleUser() && isGoogleClassroomEnabled() && !isRunCompleted() && run.project.wiseVersion !== 4">
<mat-icon svgIcon="google-classroom"></mat-icon>
<span i18n>Add to Google Classroom</span>
<span i18n>Share to Google Classroom</span>
</a>
<a mat-menu-item href="{{ reportProblemLink }}">
<mat-icon>report_problem</mat-icon>
Expand Down
Loading

0 comments on commit b858e2a

Please sign in to comment.