use of org.olat.course.nodes.dialog.DialogElement in project OpenOLAT by OpenOLAT.
the class DialogCourseNodeRunController method doFinalizeUploadFile.
private void doFinalizeUploadFile(VFSLeaf file) {
// everything when well so save the property
DialogElement element = dialogElmsMgr.createDialogElement(entry, getIdentity(), file.getName(), file.getSize(), courseNode.getIdent());
VFSContainer dialogContainer = dialogElmsMgr.getDialogContainer(element);
VFSManager.copyContent(file.getParentContainer(), dialogContainer);
// inform subscription manager about new element
if (subsContext != null) {
notificationsManager.markPublisherNews(subsContext, getIdentity(), true);
}
filesCtrl.loadModel();
}
use of org.olat.course.nodes.dialog.DialogElement in project OpenOLAT by OpenOLAT.
the class DialogCourseNodeRunController method doDialog.
private void doDialog(UserRequest ureq, DialogElementRow row) {
removeAsListenerAndDispose(dialogCtr);
DialogElement element = dialogElmsMgr.getDialogElementByKey(row.getDialogElementKey());
if (element == null) {
showInfo("element.already.deleted");
filesCtrl.loadModel();
} else {
dialogCtr = new DialogElementController(ureq, getWindowControl(), element, userCourseEnv, courseNode, nodeEvaluation);
listenTo(dialogCtr);
mainVC.put("forum", dialogCtr.getInitialComponent());
}
}
use of org.olat.course.nodes.dialog.DialogElement in project OpenOLAT by OpenOLAT.
the class DialogCourseNodeRunController method activateByDialogElement.
private void activateByDialogElement(UserRequest ureq, Long elementKey) {
DialogElement element = dialogElmsMgr.getDialogElementByKey(elementKey);
if (!checkAccess(element)) {
return;
}
dialogCtr = new DialogElementController(ureq, getWindowControl(), element, userCourseEnv, courseNode, nodeEvaluation);
listenTo(dialogCtr);
mainVC.put("forum", dialogCtr.getInitialComponent());
}
use of org.olat.course.nodes.dialog.DialogElement in project OpenOLAT by OpenOLAT.
the class DialogCourseNodeRunController method doCopySelectedFile.
private void doCopySelectedFile(String fileUrl) {
VFSContainer courseContainer = userCourseEnv.getCourseEnvironment().getCourseFolderContainer();
VFSLeaf vl = (VFSLeaf) courseContainer.resolve(fileUrl);
DialogElement newElement = dialogElmsMgr.createDialogElement(entry, getIdentity(), vl.getName(), vl.getSize(), courseNode.getIdent());
// copy file
VFSContainer dialogContainer = dialogElmsMgr.getDialogContainer(newElement);
VFSLeaf copyVl = dialogContainer.createChildLeaf(vl.getName());
if (copyVl == null) {
copyVl = (VFSLeaf) dialogContainer.resolve(vl.getName());
}
VFSManager.copyContent(vl, copyVl);
// inform subscription manager about new element
if (subsContext != null) {
notificationsManager.markPublisherNews(subsContext, getIdentity(), true);
}
filesCtrl.loadModel();
}
use of org.olat.course.nodes.dialog.DialogElement in project openolat by klemens.
the class DialogCourseNodeIndexer method doIndex.
@Override
public void doIndex(SearchResourceContext repositoryResourceContext, ICourse course, CourseNode courseNode, OlatFullIndexer indexWriter) throws IOException, InterruptedException {
SearchResourceContext courseNodeResourceContext = createSearchResourceContext(repositoryResourceContext, courseNode, null);
Document document = CourseNodeDocument.createDocument(courseNodeResourceContext, courseNode);
indexWriter.addDocument(document);
RepositoryEntry entry = course.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
DialogElementsManager dialogElmsMgr = CoreSpringFactory.getImpl(DialogElementsManager.class);
List<DialogElement> elements = dialogElmsMgr.getDialogElements(entry, courseNode.getIdent());
for (DialogElement element : elements) {
Forum forum = element.getForum();
doIndexAllMessages(courseNodeResourceContext, forum, indexWriter);
doIndexFile(element, courseNodeResourceContext, indexWriter);
}
}
Aggregations