示例#1
0
 public OperationResult MoveFileOrFolder(string scoId, string destinationFolderScoId)
 {
     try
     {
         var ac     = this.GetUserProvider();
         var helper = new ContentEditControllerHelper(Logger, ac);
         return(helper.MoveSco(scoId, destinationFolderScoId));
     }
     catch (Exception ex)
     {
         string errorMessage = GetOutputErrorMessage("ContentApi-MoveFileOrFolder", ex);
         return(OperationResultWithData <IEnumerable <ScoContentDto> > .Error(errorMessage));
     }
 }
示例#2
0
        public OperationResult MoveFileOrFolder(string scoId, string destinationFolderScoId)
        {
            try
            {
                if (!LmsCompany.GetSetting <bool>(LmsCompanySettingNames.EnableMyContent))
                {
                    return(OperationResult.Error("Operation is not enabled."));
                }

                var ac             = this.GetUserProvider();
                var contentService = new ContentService(Logger, ac);
                var helper         = new ContentEditControllerHelper(Logger, ac);
                return(helper.MoveSco(scoId, destinationFolderScoId));
            }
            catch (Exception ex)
            {
                string errorMessage = GetOutputErrorMessage("ContentApi-MoveFileOrFolder", ex);
                return(OperationResultWithData <IEnumerable <ScoContentDto> > .Error(errorMessage));
            }
        }