SEBSERV-553 fixed show quit link and improved logging

This commit is contained in:
anhefti 2024-06-25 10:31:11 +02:00
parent b808d65f53
commit 0b21baac24

View file

@ -9,6 +9,7 @@
package ch.ethz.seb.sebserver.webservice.weblayer.api;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@ -63,6 +64,7 @@ public class LmsIntegrationController {
@RequestParam(name = API.LMS_FULL_INTEGRATION_EXAM_DATA, required = false) final String examData,
@RequestParam(name = API.LMS_FULL_INTEGRATION_QUIT_PASSWORD, required = false) final String quitPassword,
@RequestParam(name = API.LMS_FULL_INTEGRATION_QUIT_LINK, required = false) final Integer quitLink,
final HttpServletRequest request,
final HttpServletResponse response) {
log.info("Importing exam from LMS call. lmsUUId: {} courseId: {} quizId: {} templateId: {} quitPassword: {} quitLink: {}",
@ -73,13 +75,17 @@ public class LmsIntegrationController {
StringUtils.isNotBlank(quitPassword) ? "yes" : "no",
quitLink);
if (log.isDebugEnabled()) {
log.debug("Importing exam from LMS call. All param: {}", request.getParameterNames());
}
final Exam exam = fullLmsIntegrationService.importExam(
lmsUUId,
courseId,
quizId,
templateId,
quitPassword,
BooleanUtils.toBooleanObject(quitLink),
quitLink != null && BooleanUtils.toBoolean(quitLink),
examData)
.onError(e -> {
log.error(