//two cases:
// -- VERY RARE CASE -- 1) qti is open in an editor session right now on the screen (or session on the way to timeout)
// -- 99% of cases -- 2) qti is ready to be run as test/survey
String repositorySoftkey = (String) moduleConfiguration.get(IQEditController.CONFIG_KEY_REPOSITORY_SOFTKEY);
RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(repositorySoftkey, true);
if (CoordinatorManager.getCoordinator().getLocker().isLocked(re.getOlatResource(), null)){
Translator translator = Util.createPackageTranslator(this.getClass(), ureq.getLocale());
//so this resource is locked, let's find out who locked it
LockResult lockResult = CoordinatorManager.getCoordinator().getLocker().acquireLock(re.getOlatResource(), ureq.getIdentity(), null);
return MessageUIFactory.createInfoMessage(ureq, wControl, translator.translate("status.currently.locked.title"),
translator.translate("status.currently.locked", new String[] {lockResult.getOwner().getName()}));
}else{
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrap(re, OlatResourceableType.iq));
return new IQDisplayController(moduleConfiguration, secCallback, ureq, wControl, callingResId, callingResDetail);