use of org.olat.course.run.navigation.NodeRunConstructionResult in project openolat by klemens.
the class PodcastCourseNode method createNodeRunConstructionResult.
/**
* @see org.olat.course.nodes.AbstractAccessableCourseNode#createNodeRunConstructionResult(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.WindowControl,
* org.olat.course.run.userview.UserCourseEnvironment,
* org.olat.course.run.userview.NodeEvaluation, java.lang.String)
*/
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl control, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
RepositoryEntry entry = getReferencedRepositoryEntry();
// create business path courseID:nodeID
// userCourseEnv.getCourseEnvironment().getCourseResourceableId();
// getIdent();
Long courseId = userCourseEnv.getCourseEnvironment().getCourseResourceableId();
String nodeId = this.getIdent();
boolean isAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
boolean isGuest = ureq.getUserSession().getRoles().isGuestOnly();
boolean isOwner = RepositoryManager.getInstance().isOwnerOfRepositoryEntry(ureq.getIdentity(), entry);
FeedSecurityCallback callback;
if (userCourseEnv.isCourseReadOnly()) {
callback = new FeedReadOnlySecurityCallback();
} else {
callback = new FeedNodeSecurityCallback(ne, isAdmin, isOwner, isGuest);
}
SubscriptionContext subsContext = CourseModule.createSubscriptionContext(userCourseEnv.getCourseEnvironment(), this);
callback.setSubscriptionContext(subsContext);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrap(this));
FeedMainController podcastCtr = PodcastUIFactory.getInstance(ureq.getLocale()).createMainController(entry.getOlatResource(), ureq, control, callback, courseId, nodeId);
List<ContextEntry> entries = BusinessControlFactory.getInstance().createCEListFromResourceType(nodecmd);
podcastCtr.activate(ureq, entries, null);
Controller wrapperCtrl = TitledWrapperHelper.getWrapper(ureq, control, podcastCtr, this, "o_podcast_icon");
NodeRunConstructionResult result = new NodeRunConstructionResult(wrapperCtrl);
return result;
}
use of org.olat.course.run.navigation.NodeRunConstructionResult in project openolat by klemens.
the class DialogCourseNode method createNodeRunConstructionResult.
/**
* @see org.olat.course.nodes.GenericCourseNode#createNodeRunConstructionResult(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.WindowControl,
* org.olat.course.run.userview.UserCourseEnvironment,
* org.olat.course.run.userview.NodeEvaluation, java.lang.String)
*/
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
DialogCourseNodeRunController ctrl = new DialogCourseNodeRunController(ureq, wControl, this, userCourseEnv, ne);
Controller wrappedCtrl = TitledWrapperHelper.getWrapper(ureq, wControl, ctrl, this, "o_dialog_icon");
return new NodeRunConstructionResult(wrappedCtrl);
}
use of org.olat.course.run.navigation.NodeRunConstructionResult in project openolat by klemens.
the class EdubaseCourseNode method createNodeRunConstructionResult.
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
updateModuleConfigDefaults(false);
Controller runCtrl;
if (userCourseEnv.isCourseReadOnly()) {
Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
String title = trans.translate("freezenoaccess.title");
String message = trans.translate("freezenoaccess.message");
runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else if (userCourseEnv.getIdentityEnvironment().getRoles().isGuestOnly()) {
Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
String title = trans.translate("guestnoaccess.title");
String message = trans.translate("guestnoaccess.message");
runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else {
runCtrl = new EdubaseRunController(ureq, wControl, this.getModuleConfiguration());
}
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, runCtrl, this, "o_edubase_icon");
return new NodeRunConstructionResult(ctrl);
}
use of org.olat.course.run.navigation.NodeRunConstructionResult in project openolat by klemens.
the class ScormCourseNode 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) {
updateModuleConfigDefaults(false);
ScormRunController cprunC = new ScormRunController(getModuleConfiguration(), ureq, userCourseEnv, wControl, this, false);
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, cprunC, this, "o_scorm_icon");
// no inline-in-olat-menu integration possible: no display configuration option
return new NodeRunConstructionResult(ctrl);
}
use of org.olat.course.run.navigation.NodeRunConstructionResult in project openolat by klemens.
the class VideoCourseNode method createNodeRunConstructionResult.
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
NodeRunConstructionResult ncr;
updateModuleConfigDefaults(false);
VideoRunController cprunC = new VideoRunController(getModuleConfiguration(), wControl, ureq, userCourseEnv, this);
ncr = cprunC.createNodeRunConstructionResult(ureq);
return ncr;
}
Aggregations