Skip to content
Snippets Groups Projects
Commit e07b6823 authored by uhensler's avatar uhensler
Browse files

OO-3939: Increase download (view) count when open a document in editor

parent f2bfdaee
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
*/ */
package org.olat.core.commons.modules.bc.commands; package org.olat.core.commons.modules.bc.commands;
import org.olat.core.CoreSpringFactory;
import org.olat.core.commons.editor.htmleditor.HTMLEditorConfig; import org.olat.core.commons.editor.htmleditor.HTMLEditorConfig;
import org.olat.core.commons.modules.bc.components.FolderComponent; import org.olat.core.commons.modules.bc.components.FolderComponent;
import org.olat.core.commons.modules.bc.components.ListRenderer; import org.olat.core.commons.modules.bc.components.ListRenderer;
...@@ -30,6 +31,7 @@ import org.olat.core.commons.services.doceditor.DocumentEditorService; ...@@ -30,6 +31,7 @@ import org.olat.core.commons.services.doceditor.DocumentEditorService;
import org.olat.core.commons.services.doceditor.ui.DocEditorFullscreenController; import org.olat.core.commons.services.doceditor.ui.DocEditorFullscreenController;
import org.olat.core.commons.services.notifications.NotificationsManager; import org.olat.core.commons.services.notifications.NotificationsManager;
import org.olat.core.commons.services.notifications.SubscriptionContext; import org.olat.core.commons.services.notifications.SubscriptionContext;
import org.olat.core.commons.services.vfs.VFSRepositoryService;
import org.olat.core.gui.UserRequest; import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.Component; import org.olat.core.gui.components.Component;
import org.olat.core.gui.control.Controller; import org.olat.core.gui.control.Controller;
...@@ -113,6 +115,10 @@ public class CmdOpenContent extends BasicController implements FolderCommand { ...@@ -113,6 +115,10 @@ public class CmdOpenContent extends BasicController implements FolderCommand {
editCtrl = new DocEditorFullscreenController(ureq, getWindowControl(), vfsLeaf, secCallback, configs); editCtrl = new DocEditorFullscreenController(ureq, getWindowControl(), vfsLeaf, secCallback, configs);
listenTo(editCtrl); listenTo(editCtrl);
if (vfsLeaf.canMeta() == VFSConstants.YES) {
CoreSpringFactory.getImpl(VFSRepositoryService.class).increaseDownloadCount(vfsLeaf);
}
return this; return this;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment