...
 
Commits (9)
# Changelog
## 2.7.4
This is a maintenance release which only brings libraries up to date to fix
potential bugs.
## 2.7.3
This is a maintenance release which only brings libraries up to date to fix
potential bugs.
......
......@@ -8,7 +8,7 @@
<properties>
<spring-boot-version>1.5.22.RELEASE</spring-boot-version>
<io.netty-version>4.1.39.Final</io.netty-version>
<io.netty-version>4.1.43.Final</io.netty-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<timestamp>${maven.build.timestamp}</timestamp>
<sonar.language>java</sonar.language>
......@@ -236,12 +236,12 @@
<dependency>
<groupId>org.pac4j</groupId>
<artifactId>pac4j-oauth</artifactId>
<version>3.8.1</version>
<version>3.8.3</version>
</dependency>
<dependency>
<groupId>org.pac4j</groupId>
<artifactId>pac4j-oidc</artifactId>
<version>3.8.1</version>
<version>3.8.3</version>
</dependency>
<dependency>
<groupId>org.pac4j</groupId>
......@@ -318,7 +318,7 @@
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.23</version>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>com.codahale.metrics</groupId>
......@@ -328,7 +328,7 @@
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
<version>2.11.0</version>
<version>3.0.1</version>
</dependency>
</dependencies>
......@@ -363,7 +363,7 @@
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.19.v20190610</version>
<version>9.4.24.v20191120</version>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<webApp>
......@@ -383,7 +383,7 @@
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.6.1.1688</version>
<version>3.7.0.1746</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......@@ -393,7 +393,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.4</version>
<version>0.8.5</version>
<executions>
<execution>
<id>default-prepare-agent</id>
......@@ -475,7 +475,7 @@
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>3.0.1</version>
<version>4.0.0</version>
<executions>
<execution>
<goals>
......
......@@ -36,7 +36,11 @@ public class PointBasedLearningProgress extends VariantLearningProgress {
lpv.setCourseProgress(coursePercentage());
lpv.setNumQuestions(courseScore.getQuestionCount());
lpv.setNumUsers(courseScore.getTotalUserCount());
lpv.setNumerator(courseScore.getTotalUserScore() / courseScore.getTotalUserCount());
if (courseScore.getTotalUserCount() == 0) {
lpv.setNumerator(0);
} else {
lpv.setNumerator(courseScore.getTotalUserScore() / courseScore.getTotalUserCount());
}
lpv.setDenominator(courseScore.getMaximumScore());
return lpv;
}
......
......@@ -178,7 +178,7 @@ Add the following lines to the `VirtualHost` section of the file:
ProxyPass http://localhost:8080/api/
ProxyPassReverse http://localhost:8080/api/
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto %{REQUEST_SCHEME}
RequestHeader set X-Forwarded-Proto %{REQUEST_SCHEME}e
</Location>
<Location /socket.io/>
ProxyPass ws://localhost:8090/socket.io/
......@@ -187,6 +187,7 @@ Add the following lines to the `VirtualHost` section of the file:
To enable the required Apache HTTP Server modules, simply type:
# a2enmod headers
# a2enmod proxy
# a2enmod proxy_http
# a2enmod proxy_wstunnel
......
......@@ -154,4 +154,9 @@ public class PointBasedLearningProgressTest {
assertEquals(10, numerator);
assertEquals(20, denominator);
}
@Test
public void shouldNotDivideByZeroInNumerator() {
assertEquals(0, lp.getCourseProgress(null).getNumerator());
}
}