} catch (NumberFormatException e) {
Tracing.createLoggerFor(InstitutionPortletRunController.class).error(e.getMessage());
}
if (polyLink.getLinkType().equals(InstitutionPortlet.TYPE_COURSE)) {
RepositoryManager rm = RepositoryManager.getInstance();
RepositoryEntry re = null;
// id corresponding to the conditions set for this user
if (polyLink != null && resultIDForUser != null) re = rm.lookupRepositoryEntry(resultIDForUser);
// if ressource is not available choose default link
if (re == null && defaultID != null) re = rm.lookupRepositoryEntry(defaultID);
if (re != null) {
if (!rm.isAllowedToLaunch(ureq, re)) {
getWindowControl().setWarning(translate("warn.cantlaunch"));
} else {
OLATResourceable ores = re.getOlatResource();
DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
DTab dt = dts.getDTab(ores);