SEBSERV-552 fixed SPS exam creation and update
This commit is contained in:
parent
27542a2293
commit
7fbf49397c
2 changed files with 5 additions and 3 deletions
|
@ -448,6 +448,8 @@ public class MoodleRestTemplateFactoryImpl implements MoodleRestTemplateFactory
|
|||
}
|
||||
});
|
||||
|
||||
log.info("Upload to Moodle url: {}", uri.toString());
|
||||
|
||||
return super.postForObject(
|
||||
uri.toString(),
|
||||
multiPartAttributes,
|
||||
|
@ -470,7 +472,7 @@ public class MoodleRestTemplateFactoryImpl implements MoodleRestTemplateFactory
|
|||
if (response.getStatusCode() != HttpStatus.OK) {
|
||||
throw new RuntimeException(
|
||||
"Failed to call Moodle webservice API function: " + functionName + " lms setup: " +
|
||||
lmsSetup + " response: " + response.getBody());
|
||||
lmsSetup.name + " response: " + response.getBody());
|
||||
}
|
||||
|
||||
final String body = response.getBody();
|
||||
|
@ -488,7 +490,7 @@ public class MoodleRestTemplateFactoryImpl implements MoodleRestTemplateFactory
|
|||
this.accessToken = null;
|
||||
log.warn(
|
||||
"Failed to call Moodle webservice API function: {} lms setup: {} response: {}",
|
||||
functionName, lmsSetup, body);
|
||||
functionName, lmsSetup.name, body);
|
||||
}
|
||||
|
||||
return body;
|
||||
|
|
|
@ -295,7 +295,7 @@ public class ScreenProctoringServiceImpl implements ScreenProctoringService {
|
|||
@Override
|
||||
public void notifyExamStarted(final ExamStartedEvent event) {
|
||||
final Exam exam = event.exam;
|
||||
if (!BooleanUtils.toBoolean(exam.additionalAttributes.get(SPSData.ATTR_SPS_ACTIVE))) {
|
||||
if (BooleanUtils.toBoolean(exam.additionalAttributes.get(SPSData.ATTR_SPS_ACTIVE))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue