/** * The access condition for wiki is composed of 2 dimensions: readonly (or access) and read&write * (or editarticle). <br> * If the access is readonly, the read&write dimension is no more relevant.<br> * If the access is not readonly, read&write condition should be evaluated. <br> * * @see * org.olat.course.nodes.GenericCourseNode#calcAccessAndVisibility(org.olat.course.condition.interpreter.ConditionInterpreter, * org.olat.course.run.userview.NodeEvaluation) */ @Override protected void calcAccessAndVisibility( final ConditionInterpreter ci, final NodeEvaluation nodeEval) { super.calcAccessAndVisibility(ci, nodeEval); final boolean editor = (getPreConditionEdit().getConditionExpression() == null ? true : ci.evaluateCondition(getPreConditionEdit())); nodeEval.putAccessStatus("editarticle", editor); }
/** * @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( final UserRequest ureq, final WindowControl wControl, final UserCourseEnvironment userCourseEnv, final NodeEvaluation ne, final String nodecmd) { if (ne.isCapabilityAccessible("access")) { final WikiRunController wikiController = new WikiRunController(wControl, ureq, this, userCourseEnv.getCourseEnvironment(), ne); return new NodeRunConstructionResult(wikiController); } final Controller controller = MessageUIFactory.createInfoMessage(ureq, wControl, null, this.getNoAccessExplanation()); return new NodeRunConstructionResult(controller, null, null, null); }