Search in sources :

Example 11 with CourseSiteConfiguration

use of org.olat.course.site.model.CourseSiteConfiguration in project OpenOLAT by OpenOLAT.

the class SitesAdminController method doCourseSite3Settings.

private void doCourseSite3Settings(UserRequest ureq) {
    if (courseSite3Ctrl == null) {
        CourseSiteConfiguration siteConfiguration = sitesModule.getConfigurationCourseSite3();
        if (siteConfiguration == null) {
            siteConfiguration = new CourseSiteConfiguration();
        }
        courseSite3Ctrl = new CourseSiteAdminController(ureq, getWindowControl(), siteConfiguration);
        listenTo(courseSite3Ctrl);
    }
    mainVC.put("segmentCmp", courseSite3Ctrl.getInitialComponent());
}
Also used : CourseSiteConfiguration(org.olat.course.site.model.CourseSiteConfiguration) CourseSiteAdminController(org.olat.course.site.ui.CourseSiteAdminController)

Example 12 with CourseSiteConfiguration

use of org.olat.course.site.model.CourseSiteConfiguration in project OpenOLAT by OpenOLAT.

the class CourseSiteDef method getCourseSiteconfiguration.

protected CourseSiteConfiguration getCourseSiteconfiguration() {
    SiteDefinitions siteModule = CoreSpringFactory.getImpl(SiteDefinitions.class);
    CourseSiteConfiguration config = siteModule.getConfigurationCourseSite1();
    return config;
}
Also used : CourseSiteConfiguration(org.olat.course.site.model.CourseSiteConfiguration) SiteDefinitions(org.olat.core.gui.control.navigation.SiteDefinitions)

Example 13 with CourseSiteConfiguration

use of org.olat.course.site.model.CourseSiteConfiguration in project OpenOLAT by OpenOLAT.

the class CourseSiteDef3 method getCourseSiteconfiguration.

@Override
protected CourseSiteConfiguration getCourseSiteconfiguration() {
    SiteDefinitions siteModule = CoreSpringFactory.getImpl(SiteDefinitions.class);
    CourseSiteConfiguration config = siteModule.getConfigurationCourseSite3();
    return config;
}
Also used : CourseSiteConfiguration(org.olat.course.site.model.CourseSiteConfiguration) SiteDefinitions(org.olat.core.gui.control.navigation.SiteDefinitions)

Example 14 with CourseSiteConfiguration

use of org.olat.course.site.model.CourseSiteConfiguration in project OpenOLAT by OpenOLAT.

the class CourseSiteContextEntryControllerCreator method getRepositoryEntry.

private RepositoryEntry getRepositoryEntry(UserRequest ureq, ContextEntry ce) {
    if (repoEntry == null) {
        if (ce.getOLATResourceable() instanceof RepositoryEntry) {
            repoEntry = (RepositoryEntry) ce.getOLATResourceable();
        } else {
            OLATResourceable ores = ce.getOLATResourceable();
            if ("CourseSite".equals(ores.getResourceableTypeName())) {
                int id = ores.getResourceableId().intValue();
                CourseSiteDef courseSiteDef = null;
                List<SiteDefinition> siteDefList = getSitesDefinitions().getSiteDefList();
                if (id == 2) {
                    for (SiteDefinition siteDef : siteDefList) {
                        if (siteDef instanceof CourseSiteDef2) {
                            courseSiteDef = (CourseSiteDef) siteDef;
                        }
                    }
                } else if (id == 1) {
                    for (SiteDefinition siteDef : siteDefList) {
                        if (siteDef instanceof CourseSiteDef) {
                            courseSiteDef = (CourseSiteDef) siteDef;
                        }
                    }
                }
                if (courseSiteDef != null) {
                    CourseSiteConfiguration config = courseSiteDef.getCourseSiteconfiguration();
                    LanguageConfiguration langConfig = courseSiteDef.getLanguageConfiguration(ureq, config);
                    if (langConfig != null) {
                        String softKey = langConfig.getRepoSoftKey();
                        RepositoryManager rm = RepositoryManager.getInstance();
                        repoEntry = rm.lookupRepositoryEntryBySoftkey(softKey, false);
                    }
                }
            } else {
                RepositoryManager rm = RepositoryManager.getInstance();
                repoEntry = rm.lookupRepositoryEntry(ores.getResourceableId());
            }
        }
    }
    return repoEntry;
}
Also used : SiteDefinition(org.olat.core.gui.control.navigation.SiteDefinition) OLATResourceable(org.olat.core.id.OLATResourceable) RepositoryManager(org.olat.repository.RepositoryManager) RepositoryEntry(org.olat.repository.RepositoryEntry) CourseSiteConfiguration(org.olat.course.site.model.CourseSiteConfiguration) LanguageConfiguration(org.olat.course.site.model.LanguageConfiguration)

Example 15 with CourseSiteConfiguration

use of org.olat.course.site.model.CourseSiteConfiguration in project OpenOLAT by OpenOLAT.

the class CourseSiteDef2 method getCourseSiteconfiguration.

@Override
protected CourseSiteConfiguration getCourseSiteconfiguration() {
    SiteDefinitions siteModule = CoreSpringFactory.getImpl(SiteDefinitions.class);
    CourseSiteConfiguration config = siteModule.getConfigurationCourseSite2();
    return config;
}
Also used : CourseSiteConfiguration(org.olat.course.site.model.CourseSiteConfiguration) SiteDefinitions(org.olat.core.gui.control.navigation.SiteDefinitions)

Aggregations

CourseSiteConfiguration (org.olat.course.site.model.CourseSiteConfiguration)20 SiteDefinitions (org.olat.core.gui.control.navigation.SiteDefinitions)8 CourseSiteAdminController (org.olat.course.site.ui.CourseSiteAdminController)8 SiteDefinition (org.olat.core.gui.control.navigation.SiteDefinition)4 LanguageConfiguration (org.olat.course.site.model.LanguageConfiguration)4 OLATResourceable (org.olat.core.id.OLATResourceable)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2 RepositoryManager (org.olat.repository.RepositoryManager)2