use of org.olat.course.nodes.ms.MSCourseNodeRunController in project OpenOLAT by OpenOLAT.
the class GTACoachedParticipantGradingController method doGraded.
private void doGraded(UserRequest ureq, UserCourseEnvironment assessedUserCourseEnv) {
removeAsListenerAndDispose(msCtrl);
msCtrl = new MSCourseNodeRunController(ureq, getWindowControl(), assessedUserCourseEnv, gtaNode, false, false, true);
listenTo(msCtrl);
mainVC.put("msrun", msCtrl.getInitialComponent());
AssessmentEvaluation scoreEval = gtaNode.getUserScoreEvaluation(assessedUserCourseEnv);
if (scoreEval.getAssessmentStatus() == AssessmentEntryStatus.done) {
if (assignedTask == null) {
RepositoryEntry courseEntry = coachCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
TaskList taskList = gtaManager.createIfNotExists(courseEntry, gtaNode);
assignedTask = gtaManager.createTask(null, taskList, TaskProcess.graded, null, assessedIdentity, gtaNode);
} else {
assignedTask = gtaManager.updateTask(assignedTask, TaskProcess.graded, gtaNode, Role.coach);
}
fireEvent(ureq, Event.CHANGED_EVENT);
}
}
use of org.olat.course.nodes.ms.MSCourseNodeRunController in project OpenOLAT by OpenOLAT.
the class GTACoachedParticipantGradingController method setAssessmentDatas.
private void setAssessmentDatas(UserRequest ureq) {
removeAsListenerAndDispose(msCtrl);
ICourse course = CourseFactory.loadCourse(courseOres);
UserCourseEnvironment uce = AssessmentHelper.createAndInitUserCourseEnvironment(assessedIdentity, course);
msCtrl = new MSCourseNodeRunController(ureq, getWindowControl(), uce, gtaNode, false, false, true);
listenTo(msCtrl);
mainVC.put("msrun", msCtrl.getInitialComponent());
}
use of org.olat.course.nodes.ms.MSCourseNodeRunController in project OpenOLAT by OpenOLAT.
the class MSCourseNode method createNodeRunConstructionResult.
/**
* @see org.olat.course.nodes.CourseNode#createNodeRunConstructionResult(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.WindowControl,
* org.olat.course.run.userview.UserCourseEnvironment,
* org.olat.course.run.userview.NodeEvaluation)
*/
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
Controller controller;
// Do not allow guests to have manual scoring
Roles roles = ureq.getUserSession().getRoles();
if (roles.isGuestOnly()) {
Translator trans = Util.createPackageTranslator(MSCourseNode.class, ureq.getLocale());
String title = trans.translate("guestnoaccess.title");
String message = trans.translate("guestnoaccess.message");
controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else {
controller = new MSCourseNodeRunController(ureq, wControl, userCourseEnv, this, true, true);
}
Controller wrappedCtrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_ms_icon");
return new NodeRunConstructionResult(wrappedCtrl);
}
Aggregations