use of org.olat.modules.forms.ui.EvaluationFormController in project openolat by klemens.
the class EvaluationFormHandler method getController.
private Controller getController(UserRequest ureq, WindowControl wControl, PageBody body, EvaluationFormPart eva) {
PortfolioService portfolioService = CoreSpringFactory.getImpl(PortfolioService.class);
Controller ctrl = null;
Page page = portfolioService.getPageByBody(body);
List<AccessRights> accessRights = portfolioService.getAccessRights(page);
if (hasRole(PortfolioRoles.owner, ureq.getIdentity(), accessRights)) {
ctrl = new EvaluationFormController(ureq, wControl, ureq.getIdentity(), body, eva.getContent(), false);
} else if (hasRole(PortfolioRoles.coach, ureq.getIdentity(), accessRights)) {
Identity owner = getOwner(accessRights);
ctrl = new EvaluationFormController(ureq, wControl, owner, body, eva.getContent(), true);
} else if (hasRole(PortfolioRoles.reviewer, ureq.getIdentity(), accessRights) || hasRole(PortfolioRoles.invitee, ureq.getIdentity(), accessRights)) {
Identity owner = getOwner(accessRights);
ctrl = new EvaluationFormController(ureq, wControl, owner, body, eva.getContent(), true);
}
return ctrl;
}
use of org.olat.modules.forms.ui.EvaluationFormController in project openolat by klemens.
the class MultiEvaluationFormController method doOpenEvalutationForm.
private void doOpenEvalutationForm(UserRequest ureq, Identity evaluator) {
boolean ro = readOnly || !evaluator.equals(getIdentity());
boolean doneButton = !ro && evaluator.equals(getIdentity()) && (owner == null || !owner.equals(evaluator));
currentEvalutionFormCtrl = new EvaluationFormController(ureq, getWindowControl(), evaluator, anchor, formEntry, ro, doneButton);
listenTo(currentEvalutionFormCtrl);
mainVC.put("segmentCmp", currentEvalutionFormCtrl.getInitialComponent());
}
use of org.olat.modules.forms.ui.EvaluationFormController in project OpenOLAT by OpenOLAT.
the class MultiEvaluationFormController method createEvalutationForm.
private Controller createEvalutationForm(UserRequest ureq, Identity evaluator) {
boolean ro = readOnly || !evaluator.equals(getIdentity());
boolean doneButton = !ro && evaluator.equals(getIdentity()) && (owner == null || !owner.equals(evaluator));
EvaluationFormController evalutionFormCtrl = new EvaluationFormController(ureq, getWindowControl(), evaluator, anchor, formEntry, ro, doneButton);
listenTo(evalutionFormCtrl);
return evalutionFormCtrl;
}
use of org.olat.modules.forms.ui.EvaluationFormController in project OpenOLAT by OpenOLAT.
the class MultiEvaluationFormController method doOpenEvalutationForm.
private void doOpenEvalutationForm(UserRequest ureq, Identity evaluator) {
boolean ro = readOnly || !evaluator.equals(getIdentity());
boolean doneButton = !ro && evaluator.equals(getIdentity()) && (owner == null || !owner.equals(evaluator));
currentEvalutionFormCtrl = new EvaluationFormController(ureq, getWindowControl(), evaluator, anchor, formEntry, ro, doneButton);
listenTo(currentEvalutionFormCtrl);
mainVC.put("segmentCmp", currentEvalutionFormCtrl.getInitialComponent());
}
use of org.olat.modules.forms.ui.EvaluationFormController in project OpenOLAT by OpenOLAT.
the class EvaluationFormHandler method getController.
private Controller getController(UserRequest ureq, WindowControl wControl, PageBody body, EvaluationFormPart eva) {
PortfolioService portfolioService = CoreSpringFactory.getImpl(PortfolioService.class);
Controller ctrl = null;
Page page = portfolioService.getPageByBody(body);
List<AccessRights> accessRights = portfolioService.getAccessRights(page);
if (hasRole(PortfolioRoles.owner, ureq.getIdentity(), accessRights)) {
ctrl = new EvaluationFormController(ureq, wControl, ureq.getIdentity(), body, eva.getContent(), false);
} else if (hasRole(PortfolioRoles.coach, ureq.getIdentity(), accessRights)) {
Identity owner = getOwner(accessRights);
ctrl = new EvaluationFormController(ureq, wControl, owner, body, eva.getContent(), true);
} else if (hasRole(PortfolioRoles.reviewer, ureq.getIdentity(), accessRights) || hasRole(PortfolioRoles.invitee, ureq.getIdentity(), accessRights)) {
Identity owner = getOwner(accessRights);
ctrl = new EvaluationFormController(ureq, wControl, owner, body, eva.getContent(), true);
}
return ctrl;
}
Aggregations