use of org.olat.course.nodes.dialog.DialogElement in project openolat by klemens.
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 klemens.
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 klemens.
the class DialogElementListController method doDelete.
private void doDelete(DialogElementRow rowToDelete) {
DialogElement elementToDelete = dialogElementsManager.getDialogElementByKey(rowToDelete.getDialogElementKey());
// archive data to personal folder
File exportDir = CourseFactory.getOrCreateDataExportDirectory(getIdentity(), courseNode.getShortTitle());
courseNode.doArchiveElement(elementToDelete, exportDir, getLocale());
dialogElementsManager.deleteDialogElement(elementToDelete);
// do logging
ThreadLocalUserActivityLogger.log(CourseLoggingAction.DIALOG_ELEMENT_FILE_DELETED, getClass(), LoggingResourceable.wrapUploadFile(elementToDelete.getFilename()));
}
use of org.olat.course.nodes.dialog.DialogElement in project openolat by klemens.
the class DialogElementListEditController method doDelete.
private void doDelete(DialogElementRow rowToDelete) {
DialogElement elementToDelete = dialogElementsManager.getDialogElementByKey(rowToDelete.getDialogElementKey());
// archive data to personal folder
File exportDir = CourseFactory.getOrCreateDataExportDirectory(getIdentity(), courseNode.getShortTitle());
courseNode.doArchiveElement(elementToDelete, exportDir, getLocale());
dialogElementsManager.deleteDialogElement(elementToDelete);
// do logging
ThreadLocalUserActivityLogger.log(CourseLoggingAction.DIALOG_ELEMENT_FILE_DELETED, getClass(), LoggingResourceable.wrapUploadFile(elementToDelete.getFilename()));
}
use of org.olat.course.nodes.dialog.DialogElement in project openolat by klemens.
the class DialogElementsEditController method doFinalizeUploadFile.
private void doFinalizeUploadFile(VFSLeaf file) {
if (file == null)
return;
// 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
SubscriptionContext subsContext = CourseModule.createSubscriptionContext(courseEnv, courseNode);
notificationsManager.markPublisherNews(subsContext, getIdentity(), true);
ThreadLocalUserActivityLogger.log(CourseLoggingAction.DIALOG_ELEMENT_FILE_UPLOADED, getClass(), LoggingResourceable.wrapUploadFile(file.getName()));
elementListCtrl.loadModel();
}
Aggregations