public Boolean SaveCertificationFile(CertificationType cType, Boolean withEmptyPlaceHolders, Int32 idCommunity, Int32 idUser, String cName, String cDescription, long idPath, long idSubActivity, Guid uniqueID, String extension, Boolean restore = false)
        {
            Certification cert = null;
            SubActivity   s    = Service.GetSubActivity(idSubActivity);

            if (s != null)
            {
                dtoCertification dto = dtoCertification.Create(cType);
                dto.Name = cName;
                if (!String.IsNullOrEmpty(cDescription) && cDescription.Contains("{0}"))
                {
                    cDescription = string.Format(cDescription, Service.GetPathName(idPath));
                }
                dto.Description           = cDescription;
                dto.IdCommunity           = idCommunity;
                dto.IdContainer           = idPath;
                dto.IdOwner               = idUser;
                dto.UniqueIdGeneratedFile = uniqueID;
                dto.FileExtension         = extension;
                dto.IdTemplate            = s.IdCertificate;
                dto.IdTemplateVersion     = s.IdCertificateVersion;
                dto.WithEmptyPlaceHolders = withEmptyPlaceHolders;
                dto.SourceItem            = ModuleObject.CreateLongObject(idSubActivity, s, (int)COL_BusinessLogic_v2.UCServices.Services_EduPath.ObjectType.SubActivity, idCommunity, COL_BusinessLogic_v2.UCServices.Services_EduPath.Codex, Service.ServiceModuleID());
                cert = ServiceCertifications.SaveUserCertification(dto);
            }

            return(cert != null);
        }
        private List <Certification> GetAvailableCertifications(dtoSubActivity item, Int32 idCommunity, Int32 idUser)
        {
            ModuleObject source = ModuleObject.CreateLongObject(item.Id, (int)COL_BusinessLogic_v2.UCServices.Services_EduPath.ObjectType.SubActivity, idCommunity, COL_BusinessLogic_v2.UCServices.Services_EduPath.Codex);

            source.ServiceID = Service.ServiceModuleID();
            source.FQN       = typeof(SubActivity).FullName;
            return(ServiceCertifications.GetUserCertifications(source, idUser, true));
        }