Search in sources :

Example 1 with StatisticCourseNodesController

use of org.olat.course.statistic.StatisticCourseNodesController in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doAssessmentStatistics.

/**
 * Only an helper method for the 2 methods above. Don't call it directly, there is no request on close guard.
 * @param ureq
 * @param i18nCrumbKey
 * @param typeName
 * @param tool
 * @param types
 * @return
 */
private Activateable2 doAssessmentStatistics(UserRequest ureq, String i18nCrumbKey, String typeName, Link tool, QTIType... types) {
    OLATResourceable ores = OresHelper.createOLATResourceableType(typeName);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl swControl = addToHistory(ureq, ores, null);
    if (reSecurity.isEntryAdmin() || reSecurity.isCourseCoach() || reSecurity.isGroupCoach() || hasCourseRight(CourseRights.RIGHT_STATISTICS)) {
        removeCustomCSS();
        UserCourseEnvironmentImpl uce = getUserCourseEnvironment();
        StatisticCourseNodesController ctrl = new StatisticCourseNodesController(ureq, swControl, toolbarPanel, reSecurity, uce, types);
        listenTo(ctrl);
        statsToolCtr = pushController(ureq, translate(i18nCrumbKey), ctrl);
        currentToolCtr = statsToolCtr;
        setActiveTool(tool);
        return statsToolCtr;
    }
    return null;
}
Also used : StatisticCourseNodesController(org.olat.course.statistic.StatisticCourseNodesController) UserCourseEnvironmentImpl(org.olat.course.run.userview.UserCourseEnvironmentImpl) OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Example 2 with StatisticCourseNodesController

use of org.olat.course.statistic.StatisticCourseNodesController in project openolat by klemens.

the class CourseRuntimeController method doAssessmentStatistics.

/**
 * Only an helper method for the 2 methods above. Don't call it directly, there is no request on close guard.
 * @param ureq
 * @param i18nCrumbKey
 * @param typeName
 * @param tool
 * @param types
 * @return
 */
private Activateable2 doAssessmentStatistics(UserRequest ureq, String i18nCrumbKey, String typeName, Link tool, QTIType... types) {
    OLATResourceable ores = OresHelper.createOLATResourceableType(typeName);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl swControl = addToHistory(ureq, ores, null);
    if (reSecurity.isEntryAdmin() || reSecurity.isCourseCoach() || reSecurity.isGroupCoach() || hasCourseRight(CourseRights.RIGHT_STATISTICS)) {
        removeCustomCSS();
        UserCourseEnvironmentImpl uce = getUserCourseEnvironment();
        StatisticCourseNodesController ctrl = new StatisticCourseNodesController(ureq, swControl, toolbarPanel, reSecurity, uce, types);
        listenTo(ctrl);
        statsToolCtr = pushController(ureq, translate(i18nCrumbKey), ctrl);
        currentToolCtr = statsToolCtr;
        setActiveTool(tool);
        return statsToolCtr;
    }
    return null;
}
Also used : StatisticCourseNodesController(org.olat.course.statistic.StatisticCourseNodesController) UserCourseEnvironmentImpl(org.olat.course.run.userview.UserCourseEnvironmentImpl) OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Aggregations

WindowControl (org.olat.core.gui.control.WindowControl)2 OLATResourceable (org.olat.core.id.OLATResourceable)2 UserCourseEnvironmentImpl (org.olat.course.run.userview.UserCourseEnvironmentImpl)2 StatisticCourseNodesController (org.olat.course.statistic.StatisticCourseNodesController)2