Search in sources :

Example 1 with Role

use of org.olat.modules.assessment.Role in project OpenOLAT by OpenOLAT.

the class GTAAbstractController method doUpdateAttempts.

protected void doUpdateAttempts() {
    Role by = getDoer();
    if (businessGroupTask) {
        List<Identity> identities = businessGroupService.getMembers(assessedGroup, GroupRoles.participant.name());
        ICourse course = CourseFactory.loadCourse(courseEnv.getCourseGroupManager().getCourseEntry());
        for (Identity identity : identities) {
            UserCourseEnvironment uce = AssessmentHelper.createAndInitUserCourseEnvironment(identity, course);
            gtaNode.incrementUserAttempts(uce, by);
        }
    } else {
        UserCourseEnvironment assessedUserCourseEnv = getAssessedUserCourseEnvironment();
        gtaNode.incrementUserAttempts(assessedUserCourseEnv, by);
    }
}
Also used : Role(org.olat.modules.assessment.Role) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment) ICourse(org.olat.course.ICourse) Identity(org.olat.core.id.Identity)

Example 2 with Role

use of org.olat.modules.assessment.Role in project openolat by klemens.

the class GTAAbstractController method doUpdateAttempts.

protected void doUpdateAttempts() {
    Role by = getDoer();
    if (businessGroupTask) {
        List<Identity> identities = businessGroupService.getMembers(assessedGroup, GroupRoles.participant.name());
        ICourse course = CourseFactory.loadCourse(courseEnv.getCourseGroupManager().getCourseEntry());
        for (Identity identity : identities) {
            UserCourseEnvironment uce = AssessmentHelper.createAndInitUserCourseEnvironment(identity, course);
            gtaNode.incrementUserAttempts(uce, by);
        }
    } else {
        UserCourseEnvironment assessedUserCourseEnv = getAssessedUserCourseEnvironment();
        gtaNode.incrementUserAttempts(assessedUserCourseEnv, by);
    }
}
Also used : Role(org.olat.modules.assessment.Role) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment) ICourse(org.olat.course.ICourse) Identity(org.olat.core.id.Identity)

Aggregations

Identity (org.olat.core.id.Identity)2 ICourse (org.olat.course.ICourse)2 UserCourseEnvironment (org.olat.course.run.userview.UserCourseEnvironment)2 Role (org.olat.modules.assessment.Role)2