use of org.olat.modules.assessment.ui.AssessmentToolSecurityCallback in project OpenOLAT by OpenOLAT.
the class QTI21RuntimeController method doAssessmentTool.
private Activateable2 doAssessmentTool(UserRequest ureq) {
OLATResourceable ores = OresHelper.createOLATResourceableType("TestStatistics");
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl swControl = addToHistory(ureq, ores, null);
if (reSecurity.isEntryAdmin() || reSecurity.isCourseCoach() || reSecurity.isGroupCoach()) {
AssessmentToolSecurityCallback secCallback = new AssessmentToolSecurityCallback(reSecurity.isEntryAdmin(), reSecurity.isEntryAdmin(), reSecurity.isCourseCoach(), reSecurity.isGroupCoach(), null);
AssessableResource el = getAssessableElement(getRepositoryEntry());
AssessmentToolController ctrl = new AssessmentToolController(ureq, swControl, toolbarPanel, getRepositoryEntry(), el, secCallback);
listenTo(ctrl);
assessmentToolCtrl = pushController(ureq, translate("command.openassessment"), ctrl);
currentToolCtr = assessmentToolCtrl;
setActiveTool(assessmentLink);
return assessmentToolCtrl;
}
return null;
}
use of org.olat.modules.assessment.ui.AssessmentToolSecurityCallback in project openolat by klemens.
the class CourseRuntimeController method doAssessmentTool.
private Activateable2 doAssessmentTool(UserRequest ureq) {
if (delayedClose == Delayed.assessmentTool || requestForClose(ureq)) {
OLATResourceable ores = OresHelper.createOLATResourceableType("assessmentToolv2");
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl swControl = addToHistory(ureq, ores, null);
boolean admin = reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_ASSESSMENT);
boolean nonMembers = reSecurity.isEntryAdmin();
boolean repositoryEntryMembers = reSecurity.isCourseCoach();
boolean businessGoupMembers = reSecurity.isGroupCoach();
List<BusinessGroup> coachedGroups = null;
if (businessGoupMembers) {
coachedGroups = getUserCourseEnvironment().getCoachedGroups();
}
AssessmentToolSecurityCallback secCallBack = new AssessmentToolSecurityCallback(admin, nonMembers, repositoryEntryMembers, businessGoupMembers, coachedGroups);
removeCustomCSS();
AssessmentToolController ctrl = new AssessmentToolController(ureq, swControl, toolbarPanel, getRepositoryEntry(), getUserCourseEnvironment(), secCallBack);
ctrl.activate(ureq, null, null);
listenTo(ctrl);
assessmentToolCtr = pushController(ureq, translate("command.openassessment"), ctrl);
assessmentToolCtr.assessmentModeMessage();
currentToolCtr = assessmentToolCtr;
setActiveTool(assessmentLink);
ctrl.initToolbar();
return assessmentToolCtr;
} else {
delayedClose = Delayed.assessmentTool;
}
return null;
}
use of org.olat.modules.assessment.ui.AssessmentToolSecurityCallback in project openolat by klemens.
the class QTI21RuntimeController method doAssessmentTool.
private Activateable2 doAssessmentTool(UserRequest ureq) {
OLATResourceable ores = OresHelper.createOLATResourceableType("TestStatistics");
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl swControl = addToHistory(ureq, ores, null);
if (reSecurity.isEntryAdmin() || reSecurity.isCourseCoach() || reSecurity.isGroupCoach()) {
AssessmentToolSecurityCallback secCallback = new AssessmentToolSecurityCallback(reSecurity.isEntryAdmin(), reSecurity.isEntryAdmin(), reSecurity.isCourseCoach(), reSecurity.isGroupCoach(), null);
AssessableResource el = getAssessableElement(getRepositoryEntry());
AssessmentToolController ctrl = new AssessmentToolController(ureq, swControl, toolbarPanel, getRepositoryEntry(), el, secCallback);
listenTo(ctrl);
assessmentToolCtrl = pushController(ureq, translate("command.openassessment"), ctrl);
currentToolCtr = assessmentToolCtrl;
setActiveTool(assessmentLink);
return assessmentToolCtrl;
}
return null;
}
Aggregations