SEBSERV-529 fixed
This commit is contained in:
parent
b463e5be6c
commit
28960ddacc
2 changed files with 11 additions and 5 deletions
|
@ -148,9 +148,12 @@ public class SEBRestrictionServiceImpl implements SEBRestrictionService {
|
|||
// special Moodle plugin case for ADDITIONAL_ATTR_ALTERNATIVE_SEB_BEK
|
||||
this.lmsAPIService.getLmsSetup(exam.lmsSetupId).map(lms -> {
|
||||
if (lms.lmsType == LmsType.MOODLE_PLUGIN) {
|
||||
additionalAttributes.put(
|
||||
MoodleSEBRestriction.ATTR_ALT_BEK,
|
||||
exam.getAdditionalAttribute(ADDITIONAL_ATTR_ALTERNATIVE_SEB_BEK));
|
||||
final AdditionalAttributeRecord attr = this.additionalAttributesDAO.getAdditionalAttribute(
|
||||
EntityType.EXAM,
|
||||
exam.id,
|
||||
ADDITIONAL_ATTR_ALTERNATIVE_SEB_BEK)
|
||||
.getOrThrow();
|
||||
additionalAttributes.put(MoodleSEBRestriction.ATTR_ALT_BEK, attr.getValue());
|
||||
}
|
||||
return lms;
|
||||
});
|
||||
|
|
|
@ -137,8 +137,11 @@ public class MoodlePluginCourseRestriction implements SEBRestrictionAPI {
|
|||
final ArrayList<String> configKeys = new ArrayList<>(sebRestrictionData.configKeys);
|
||||
final String quitLink = this.examConfigurationValueService.getQuitLink(exam.id);
|
||||
final String quitSecret = this.examConfigurationValueService.getQuitPassword(exam.id);
|
||||
final String additionalBEK = exam.getAdditionalAttribute(
|
||||
SEBRestrictionService.ADDITIONAL_ATTR_ALTERNATIVE_SEB_BEK);
|
||||
String additionalBEK = sebRestrictionData.additionalProperties.get(SEBRestrictionService.ADDITIONAL_ATTR_ALTERNATIVE_SEB_BEK);
|
||||
if (additionalBEK == null) {
|
||||
additionalBEK = exam.getAdditionalAttribute(
|
||||
SEBRestrictionService.ADDITIONAL_ATTR_ALTERNATIVE_SEB_BEK);
|
||||
}
|
||||
|
||||
if (additionalBEK != null && !beks.contains(additionalBEK)) {
|
||||
beks.add(additionalBEK);
|
||||
|
|
Loading…
Reference in a new issue