use of org.olat.core.gui.control.generic.textmarker.GlossaryMarkupItemController in project openolat by klemens.
the class CourseGlossaryFactory method createGlossaryMarkupWrapper.
/**
* The glossary wrapper enables the glossary in the given component. Meaning,
* within the component the glossary terms are highlighted. The controller hides
* itself, the user won't see anything besides the glossary terms.
*
* @param ureq
* @param wControl
* @param tmComponent the component to which the glossary should be applied
* @param courseConfig use the glossary configuration from the given course
* configuration
*/
public static GlossaryMarkupItemController createGlossaryMarkupWrapper(UserRequest ureq, WindowControl wControl, Component tmComponent, CourseConfig courseConfig) {
if (courseConfig.hasGlossary()) {
RepositoryEntry repoEntry = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(courseConfig.getGlossarySoftKey(), false);
if (repoEntry == null) {
// seems to be removed
return null;
}
VFSContainer glossaryFolder = GlossaryManager.getInstance().getGlossaryRootFolder(repoEntry.getOlatResource());
String glossaryId = repoEntry.getOlatResource().getResourceableId().toString();
return new GlossaryMarkupItemController(ureq, wControl, tmComponent, glossaryFolder, glossaryId);
}
return null;
}
use of org.olat.core.gui.control.generic.textmarker.GlossaryMarkupItemController in project OpenOLAT by OpenOLAT.
the class CourseGlossaryFactory method createGlossaryMarkupWrapper.
/**
* The glossary wrapper enables the glossary in the given component. Meaning,
* within the component the glossary terms are highlighted. The controller hides
* itself, the user won't see anything besides the glossary terms.
*
* @param ureq
* @param wControl
* @param tmComponent the component to which the glossary should be applied
* @param courseConfig use the glossary configuration from the given course
* configuration
*/
public static GlossaryMarkupItemController createGlossaryMarkupWrapper(UserRequest ureq, WindowControl wControl, Component tmComponent, CourseConfig courseConfig) {
if (courseConfig.hasGlossary()) {
RepositoryEntry repoEntry = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(courseConfig.getGlossarySoftKey(), false);
if (repoEntry == null) {
// seems to be removed
return null;
}
VFSContainer glossaryFolder = GlossaryManager.getInstance().getGlossaryRootFolder(repoEntry.getOlatResource());
String glossaryId = repoEntry.getOlatResource().getResourceableId().toString();
return new GlossaryMarkupItemController(ureq, wControl, tmComponent, glossaryFolder, glossaryId);
}
return null;
}
Aggregations