// do not offer the temporary bookmark feature since we have no chance to determine
// which link was from the main frameon the server.
//the stateful config must not be taken into account, as stated above.
//boolean stateful = config.getBooleanSafe(SPEditController.CONFIG_KEY_STATEFUL);
OLATResourceable ores = OresHelper.createOLATResourceableInstance(ICourse.class, userCourseEnv.getCourseEnvironment().getCourseResourceableId());
spCtr = new SinglePageController(ureq, getWindowControl(), iniframe, courseFolderContainer, fileName, null, allowRelativeLinks.booleanValue(), ores);
spCtr.setAllowDownload(true);
} else {
// no frame, use the bookmark feature
String stateful = (String)config.get(SPEditController.CONFIG_KEY_STATEFUL);
//clear state if not stateful
String currentUri = !stateful.equals(Boolean.FALSE.toString()) ? (String) tempstorage.get(KEY_CURRENT_URI) : null;
boolean showHomeLink = !stateful.equals(SPEditController.KEY_TRUE_WITHOUT_HOMELINK);
OLATResourceable ores = OresHelper.createOLATResourceableInstance(ICourse.class, userCourseEnv.getCourseEnvironment().getCourseResourceableId());
spCtr = new SinglePageController(ureq, getWindowControl(), iniframe, courseFolderContainer, fileName, currentUri, allowRelativeLinks.booleanValue(),showHomeLink, ores);
}
// only for inline integration: register for controller event to forward a olatcmd to the course,
// and also to remember latest position in the script
this.listenTo(spCtr);