Search in sources :

Example 6 with MSCourseNodeRunController

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);
    }
}
Also used : MSCourseNodeRunController(org.olat.course.nodes.ms.MSCourseNodeRunController) AssessmentEvaluation(org.olat.course.run.scoring.AssessmentEvaluation) TaskList(org.olat.course.nodes.gta.TaskList) RepositoryEntry(org.olat.repository.RepositoryEntry)

Example 7 with MSCourseNodeRunController

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());
}
Also used : MSCourseNodeRunController(org.olat.course.nodes.ms.MSCourseNodeRunController) UserCourseEnvironment(org.olat.course.run.userview.UserCourseEnvironment) ICourse(org.olat.course.ICourse)

Example 8 with MSCourseNodeRunController

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);
}
Also used : MSCourseNodeRunController(org.olat.course.nodes.ms.MSCourseNodeRunController) PackageTranslator(org.olat.core.gui.translator.PackageTranslator) Translator(org.olat.core.gui.translator.Translator) Roles(org.olat.core.id.Roles) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) MSEditFormController(org.olat.course.nodes.ms.MSEditFormController) AssessmentCourseNodeController(org.olat.course.assessment.ui.tool.AssessmentCourseNodeController) MSIdentityListCourseNodeController(org.olat.course.nodes.ms.MSIdentityListCourseNodeController) MSCourseNodeRunController(org.olat.course.nodes.ms.MSCourseNodeRunController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) MSCourseNodeEditController(org.olat.course.nodes.ms.MSCourseNodeEditController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Aggregations

MSCourseNodeRunController (org.olat.course.nodes.ms.MSCourseNodeRunController)8 Controller (org.olat.core.gui.control.Controller)2 TabbableController (org.olat.core.gui.control.generic.tabbable.TabbableController)2 PackageTranslator (org.olat.core.gui.translator.PackageTranslator)2 Translator (org.olat.core.gui.translator.Translator)2 Roles (org.olat.core.id.Roles)2 ICourse (org.olat.course.ICourse)2 AssessmentCourseNodeController (org.olat.course.assessment.ui.tool.AssessmentCourseNodeController)2 NodeEditController (org.olat.course.editor.NodeEditController)2 TaskList (org.olat.course.nodes.gta.TaskList)2 MSCourseNodeEditController (org.olat.course.nodes.ms.MSCourseNodeEditController)2 MSEditFormController (org.olat.course.nodes.ms.MSEditFormController)2 MSIdentityListCourseNodeController (org.olat.course.nodes.ms.MSIdentityListCourseNodeController)2 NodeRunConstructionResult (org.olat.course.run.navigation.NodeRunConstructionResult)2 AssessmentEvaluation (org.olat.course.run.scoring.AssessmentEvaluation)2 UserCourseEnvironment (org.olat.course.run.userview.UserCourseEnvironment)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2