From 302ac717e4393cf83b3f057ab9d92ae2ca3c1b31 Mon Sep 17 00:00:00 2001 From: Sam Ottenhoff Date: Thu, 12 Dec 2024 18:59:49 +0100 Subject: [PATCH] Avoid errors from EntityBroker on an adhoc-group (#164) (cherry picked from commit 9d2ae8cc9e827979106716c025a036a928f1b0f5) --- .../sakaiproject/evaluation/logic/EvalCommonLogicImpl.java | 4 ++-- .../evaluation/logic/externals/EvalExternalLogicImpl.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sakai-evaluation-impl/src/java/org/sakaiproject/evaluation/logic/EvalCommonLogicImpl.java b/sakai-evaluation-impl/src/java/org/sakaiproject/evaluation/logic/EvalCommonLogicImpl.java index 6f228de76..eff87b5c1 100644 --- a/sakai-evaluation-impl/src/java/org/sakaiproject/evaluation/logic/EvalCommonLogicImpl.java +++ b/sakai-evaluation-impl/src/java/org/sakaiproject/evaluation/logic/EvalCommonLogicImpl.java @@ -364,8 +364,8 @@ public EvalGroup makeEvalGroupObject(String evalGroupId) { } EvalGroup c = null; - if (c == null) { - // check external + if (!evalGroupId.startsWith(EvalAdhocGroup.ADHOC_ID_PREFIX)) { + // check external as long as it doesn't start with "adhoc-group:" c = externalLogic.makeEvalGroupObject(evalGroupId); if (c != null && EvalConstants.GROUP_TYPE_INVALID.equals(c.type)) { c = null; diff --git a/sakai-evaluation-impl/src/java/org/sakaiproject/evaluation/logic/externals/EvalExternalLogicImpl.java b/sakai-evaluation-impl/src/java/org/sakaiproject/evaluation/logic/externals/EvalExternalLogicImpl.java index cb2664002..8c5f53160 100644 --- a/sakai-evaluation-impl/src/java/org/sakaiproject/evaluation/logic/externals/EvalExternalLogicImpl.java +++ b/sakai-evaluation-impl/src/java/org/sakaiproject/evaluation/logic/externals/EvalExternalLogicImpl.java @@ -609,13 +609,13 @@ else if (evalGroupId.startsWith(EvalConstants.GROUP_ID_SITE_PREFIX)) { } } catch (Exception e) { // invalid site reference - log.debug("Could not get sakai site from evalGroupId:" + evalGroupId, e); + log.debug("Could not get sakai site from evalGroupId:{}", evalGroupId, e); c = null; } } if (c == null) { - log.debug("Could not get group from evalGroupId:" + evalGroupId); + log.debug("Could not get group from evalGroupId:{}", evalGroupId); // create a fake group placeholder as an error notice c = new EvalGroup( evalGroupId, "** INVALID: "+evalGroupId+" **", EvalConstants.GROUP_TYPE_INVALID );