public void SetAppLrsAuthCallbackUrl(String lrsAuthCallbackUrl)
        {
            ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("lrsAuthCallbackUrl", lrsAuthCallbackUrl);

            request.CallService("rustici.lrsaccount.setAppLrsAuthCallbackUrl");
        }
 /// <summary>
 /// Calling this method will start a new data export, and return an id 
 /// that can be used to check on the status of the export using a call to Status
 /// </summary>
 /// <returns>The unique id for the started data export</returns>
 public string Start()
 {
     ServiceRequest sr = new ServiceRequest(this.configuration);
     XmlDocument response = sr.CallService("rustici.export.start");
     XmlElement elem = (XmlElement)response.GetElementsByTagName("export_id")[0];
     return elem.InnerText;
 }
 /// <summary>
 /// Calling this method will cancel the export with the passed in export id.
 /// </summary>
 /// <param name="exportId"></param>
 /// <returns>True if successfully canceled</returns>
 public bool Cancel(String exportId)
 {
     ServiceRequest sr = new ServiceRequest(this.configuration);
     sr.Parameters.Add("exportid", exportId);
     sr.CallService("rustici.export.cancel");
     return true;
 }
 /* LEARNER RELATED */
 public string SetLearnerTags(string learnerID, string learnerTags)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("learnerid", learnerID);
     request.Parameters.Add("tags", learnerTags);
     XmlDocument response = request.CallService("rustici.tagging.setLearnerTags");
     return response.InnerXml;
 }
 /// <summary>
 /// Creates a new FTP User
 /// </summary>
 /// <param name="userId">User ID</param>
 /// <param name="userPass">User's Password</param>
 /// <param name="permissionDomain">permission domain for the new user</param>
 public void CreateUser(string userId, string userPass, string permissionDomain)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("userid", userId);
     request.Parameters.Add("userpass", userPass);
     if (!String.IsNullOrEmpty(permissionDomain))
         request.Parameters.Add("pd", permissionDomain);
     request.CallService("rustici.ftp.createUser");
 }
        /// <summary>
        /// Change the accessibility status of the invitation
        /// </summary>
        /// <param name="invitationId">invitationId of the invite in question</param>
        /// <param name="enable">whether to set the invite as launchable</param>
        /// <param name="open">whether new regs can be created against the invite (for public invites only)</param>
        public void ChangeStatus(String invitationId, bool enable, bool open)
        {
            ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("invitationId", invitationId);
            request.Parameters.Add("enable", enable.ToString().ToLower());
            request.Parameters.Add("open", open.ToString().ToLower());

            request.CallService("rustici.invitation.changeStatus");
        }
 public String GetReportageAuth(ReportageNavPermission navPermission, bool isAdmin)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("navpermission", navPermission.ToString().ToLower());
     request.Parameters.Add("admin", isAdmin.ToString().ToLower());
     XmlDocument response = request.CallService("rustici.reporting.getReportageAuth");
     XmlNode authNode = response.GetElementsByTagName("auth")[0];
     return authNode.InnerText;
 }
 /// <summary>
 /// List of existing dispatch destinations in your account. Callers should assume
 /// another page of data is available by calling again with the page parameter
 /// incremented, until an empty list is returned.
 /// </summary>
 /// <param name="page">Which page of results to return. Page numbers start at 1.</param>
 /// <param name="tags">A comma separated list of tags to filter results by. Results must be tagged with every tag in the list.</param>
 /// <returns>List of Destination Data objects.</returns>
 public List<DestinationData> GetDestinationList(int page, string tags)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("page", page);
     if (!string.IsNullOrEmpty(tags))
         request.Parameters.Add("tags", tags);
     XmlDocument response = request.CallService("rustici.dispatch.getDestinationList");
     return DestinationData.ConvertToDestinationDataList(response);
 }
        /// <summary>
        /// Creates a new instance of an existing registration.  This essentially creates a
        /// fresh take of a course by the user. The latest version of the associated course
        /// will be used.
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        /// <returns>Instance ID of the newly created instance</returns>
        public int CreateNewInstance(string registrationId)
        {
            ServiceRequest request = new ServiceRequest(configuration);
              request.Parameters.Add("regid", registrationId);
              XmlDocument response = request.CallService("rustici.registration.createNewInstance");

              XmlNodeList successNodes = response.GetElementsByTagName("success");
              return Convert.ToInt32(successNodes[0].Attributes["instanceid"].Value);
        }
Example #10
0
        /// <summary>
        /// Import new version of an existing course from a SCORM .pif (zip file) from
        /// an existing .zip file on the Hosted SCORM Engine server.
        /// </summary>
        /// <param name="courseId">Unique Identifier for this course.</param>
        /// <param name="path">Path to file, relative to your upload root</param>
        /// <returns>List of Import Results</returns>
        public List <ImportResult> VersionUploadedCourse(string courseId, string path, string server)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            if (server != null)
            {
                request.Server = server;
            }
            request.Parameters.Add("courseid", courseId);
            request.Parameters.Add("path", path);
            XmlDocument response = request.CallService("rustici.course.versionCourse");

            return(ImportResult.ConvertToImportResults(response));
        }
Example #11
0
        /// <summary>
        /// Get the file structure of the given course.
        /// </summary>
        /// <param name="courseId">Unique Identifier for this course.</param>
        /// <param name="versionId">Version ID of the specified course</param>
        /// <returns>XML String of the hierarchical file structure of the course</returns>
        public string GetFileStructure(string courseId, int versionId)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("courseid", courseId);
            if (versionId != Int32.MinValue)
            {
                request.Parameters.Add("versionid", versionId);
            }
            XmlDocument response = request.CallService("rustici.course.getFileStructure");

            // Return the subset of the xml starting with the top <dir>
            return(response.ChildNodes[1].InnerXml);
        }
 /// <summary>
 /// Create a new Dispatch Destination in your SCORM Cloud account.
 /// </summary>
 /// <param name="name">The name of the new destination.</param>
 /// <param name="tags">A comma separated list of tags to add to this destination.</param>
 /// <param name="email">The email address associated with the user creating this destination.</param>
 /// <returns>The id for the newly created destination.</returns>
 public string CreateDestination(string name, string tags, string email)
 {
     ServiceRequest request = new ServiceRequest(configuration);
     request.Parameters.Add("name", name);
     if (!string.IsNullOrEmpty(tags))
         request.Parameters.Add("tags", tags);
     if (!string.IsNullOrEmpty(email))
         request.Parameters.Add("email", email);
     XmlDocument response = request.CallService("rustici.dispatch.createDestination");
     String destinationId = ((XmlElement)response
                             .GetElementsByTagName("destinationId")[0])
                             .FirstChild.InnerText;
     return destinationId;
 }
Example #13
0
        /// <summary>
        /// Get a list of all of the configured AppId's permission domains
        /// </summary>
        /// <returns></returns>
        public List <string> GetDomainList()
        {
            ServiceRequest request  = new ServiceRequest(configuration);
            XmlDocument    response = request.CallService("rustici.ftp.getDomainList");

            // Map the response to a dictionary of name/value pairs
            List <string> result = new List <string>();

            foreach (XmlElement attrEl in response.GetElementsByTagName("domain"))
            {
                result.Add(attrEl.Attributes["id"].Value);
            }

            return(result);
        }
Example #14
0
        /// <summary>
        /// Update the Dispatch Destination.
        /// </summary>
        /// <param name="destinationId">The id of the destination being updated.</param>
        /// <param name="name">The new name for this destination.</param>
        /// <param name="tags">A comma separated list of tags to set for this destination. An empty string will remove all existing tags, a null value will retain them.</param>
        public void UpdateDestination(string destinationId, string name, string tags)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("destinationid", destinationId);
            if (!string.IsNullOrEmpty(name))
            {
                request.Parameters.Add("name", name);
            }
            if (tags != null)
            {
                request.Parameters.Add("tags", tags);
            }
            request.CallService("rustici.dispatch.updateDestination");
        }
Example #15
0
        /// <summary>
        /// Returns the current state of the registration, including completion
        /// and satisfaction type data.  Amount of detail depends on format parameter.
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        /// <param name="resultsFormat">Degree of detail to return</param>
        /// <returns>Registration data in XML Format</returns>
        public string GetRegistrationResult(string registrationId, RegistrationResultsFormat resultsFormat, DataFormat dataFormat)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("regid", registrationId);
            request.Parameters.Add("resultsformat", Enum.GetName(resultsFormat.GetType(), resultsFormat).ToLower());
            if (dataFormat == DataFormat.JSON)
            {
                request.Parameters.Add("dataformat", "json");
            }
            XmlDocument response = request.CallService("rustici.registration.getRegistrationResult");

            // Return the subset of the xml starting with the top <summary>
            return(response.ChildNodes[1].InnerXml);
        }
Example #16
0
        /// <summary>
        /// Delete the specified files given filenames only (not full path)
        /// </summary>
        /// <returns>List of Course Data objects</returns>
        public void DeleteFileList(Collection <string> fileNames, string permissionDomain)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            if (!String.IsNullOrEmpty(permissionDomain))
            {
                request.Parameters.Add("pd", permissionDomain);
            }

            foreach (string file in fileNames)
            {
                request.Parameters.Add("file", file);
            }

            request.CallService("rustici.upload.deleteFiles");
        }
        public string[] GetLearnerTags(string learnerID)
        {
            ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("learnerid", learnerID);            
            XmlDocument tagsXMLDoc = request.CallService("rustici.tagging.getLearnerTags");
            XmlNodeList tagNodes = tagsXMLDoc.GetElementsByTagName("tag");
            string[] tags = new string[tagNodes.Count];

            for (int t = 0; t < tagNodes.Count; t++)
            {
                string nextTag = tagNodes[t].InnerText;
                tags[t] = nextTag;
            }

            return tags;
        }
Example #18
0
        /// <summary>
        /// Get the Course Metadata in XML Format
        /// </summary>
        /// <param name="courseId">Unique Identifier for the course</param>
        /// <param name="versionId">Version of the specified course</param>
        /// <param name="scope">Defines the scope of the data to return: Course or Activity level</param>
        /// <param name="format">Defines the amount of data to return:  Summary or Detailed</param>
        /// <returns>XML string representing the Metadata</returns>
        public string GetMetadata(string courseId, int versionId, MetadataScope scope, MetadataFormat format)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("courseid", courseId);
            if (versionId != Int32.MinValue)
            {
                request.Parameters.Add("versionid", versionId);
            }
            request.Parameters.Add("scope", Enum.GetName(scope.GetType(), scope).ToLower());
            request.Parameters.Add("format", Enum.GetName(format.GetType(), format).ToLower());
            XmlDocument response = request.CallService("rustici.course.getMetadata");

            // Return the subset of the xml starting with the top <object>
            return(response.ChildNodes[1].InnerXml);
        }
        public void course()
        {
            {
                ServiceRequest req = svc.CreateNewRequest();
                req.Parameters.Add("courseid", tstCourse);
                req.Parameters.Add("tag", testTag);
                Console.WriteLine("Add: " + req.CallService("rustici.tagging.addCourseTag").OuterXml);
            }

            {
                ServiceRequest req = svc.CreateNewRequest();
                req.Parameters.Add("courseid", tstCourse);
                req.Parameters.Add("tag", testTag);
                Console.WriteLine("Remove: " + req.CallService("rustici.tagging.removeCourseTag").OuterXml);
            }
        }
Example #20
0
        /// <summary>
        /// Update course files only.  One or more course files can be updating them by
        /// including them in a .zip file and sending updates via this method.  The
        /// specified file should already exist in the upload domain space.
        /// </summary>
        /// <param name="courseId">Unique Identifier for this course.</param>
        /// <param name="versionId">Specific version of the course</param>
        /// <param name="domain">Optional security domain for the file.</param>
        /// <param name="fileName">Name of the file, including extension.</param>
        public void UpdateAssetsFromUploadedFile(string courseId, int versionId, string path, string server)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            if (server != null)
            {
                request.Server = server;
            }
            request.Parameters.Add("courseid", courseId);
            if (versionId != Int32.MinValue)
            {
                request.Parameters.Add("versionid", versionId);
            }
            request.Parameters.Add("path", path);
            request.CallService("rustici.course.updateAssets");
        }
        public string AddOrRemoveCourseTags(string courseID, string regTag, string ADD_or_REMOVE)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("courseid", courseID);
            request.Parameters.Add("tags", regTag);

            string serviceToCall = "addCourseTag";

            if (ADD_or_REMOVE == "REMOVE")
            {
                serviceToCall = "removeCourseTag";
            }
            XmlDocument response = request.CallService("rustici.tagging." + serviceToCall);

            return(response.InnerXml);
        }
        public string AddOrRemoveLearnerTag(string learnerID, string learnerTag, string ADD_or_REMOVE)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("learnerid", learnerID);
            request.Parameters.Add("tag", learnerTag);

            string serviceToCall = "addLearnerTag";

            if (ADD_or_REMOVE == "REMOVE")
            {
                serviceToCall = "removeLearnerTag";
            }
            XmlDocument response = request.CallService("rustici.tagging." + serviceToCall);

            return(response.InnerXml);
        }
Example #23
0
        /// <summary>
        /// Get a list of invitations that meet the filtering criteria.  no filtering will return all
        /// </summary>
        /// <param name="invFilter">filter for the invitation id</param>
        /// <param name="coursefilter">filter for the courseId</param>
        /// <returns>a list of InvitationInfo objects</returns>
        public List <InvitationInfo> GetInvitationList(String invFilter, String coursefilter)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            if (invFilter != null)
            {
                request.Parameters.Add("filter", invFilter);
            }
            if (coursefilter != null)
            {
                request.Parameters.Add("coursefilter", coursefilter);
            }

            XmlDocument response = request.CallService("rustici.invitation.getInvitationList");

            return(InvitationInfo.parseListFromXml(response));
        }
Example #24
0
 /// <summary>
 /// Import a SCORM .pif (zip file) from an existing .zip file on the
 /// Hosted SCORM Engine server.
 /// </summary>
 /// <param name="courseId">Unique Identifier for this course.</param>
 /// <param name="path">The relative path (rooted at your specific appid's upload area)
 /// where the zip file for importing can be found</param>
 /// <param name="itemIdToImport">ID of manifest item to import</param>
 /// <param name="permissionDomain">An permission domain to associate this course with,
 /// for ftp access service (see ftp service below).
 /// If the domain specified does not exist, the course will be placed in the default permission domain</param>
 /// <param name="useAsync">Use async import</param>
 /// <returns>List of Import Results</returns>
 public List <ImportResult> ImportUploadedCourse(string courseId, string path, string itemIdToImport, string permissionDomain, string server, bool useAsync)
 {
     if (useAsync)
     {
         String            importToken = this.ImportUploadedCourseAsync(courseId, path, itemIdToImport, permissionDomain);
         AsyncImportResult result;
         while (true)
         {
             Thread.Sleep(2000);
             result = this.GetAsyncImportResult(importToken);
             if (result.IsComplete())
             {
                 break;
             }
         }
         if (result.HasError())
         {
             throw new ServiceException(result.ErrorMessage);
         }
         else
         {
             return(result.ImportResults);
         }
     }
     else
     {
         ServiceRequest request = new ServiceRequest(configuration);
         if (server != null)
         {
             request.Server = server;
         }
         request.Parameters.Add("courseid", courseId);
         request.Parameters.Add("path", path);
         if (!String.IsNullOrEmpty(itemIdToImport))
         {
             request.Parameters.Add("itemid", itemIdToImport);
         }
         if (!String.IsNullOrEmpty(permissionDomain))
         {
             request.Parameters.Add("pd", permissionDomain);
         }
         XmlDocument response = request.CallService("rustici.course.importCourse");
         return(ImportResult.ConvertToImportResults(response));
     }
 }
        public string[] GetLearnerTags(string learnerID)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("learnerid", learnerID);
            XmlDocument tagsXMLDoc = request.CallService("rustici.tagging.getLearnerTags");
            XmlNodeList tagNodes   = tagsXMLDoc.GetElementsByTagName("tag");

            string[] tags = new string[tagNodes.Count];

            for (int t = 0; t < tagNodes.Count; t++)
            {
                string nextTag = tagNodes[t].InnerText;
                tags[t] = nextTag;
            }

            return(tags);
        }
Example #26
0
        /// <summary>
        /// Create a new Dispatch Destination in your SCORM Cloud account.
        /// </summary>
        /// <param name="name">The name of the new destination.</param>
        /// <param name="tags">A comma separated list of tags to add to this destination.</param>
        /// <param name="email">The email address associated with the user creating this destination.</param>
        /// <returns>The id for the newly created destination.</returns>
        public string CreateDestination(string name, string tags, string email)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("name", name);
            if (!string.IsNullOrEmpty(tags))
            {
                request.Parameters.Add("tags", tags);
            }
            if (!string.IsNullOrEmpty(email))
            {
                request.Parameters.Add("email", email);
            }
            XmlDocument response      = request.CallService("rustici.dispatch.createDestination");
            String      destinationId = ((XmlElement)response.GetElementsByTagName("destinationId")[0]).FirstChild.InnerText;

            return(destinationId);
        }
Example #27
0
        /// <summary>
        /// Import a SCORM .pif (zip file) from the local filesystem.
        /// </summary>
        /// <param name="courseId">Unique Identifier for this course.</param>
        /// <param name="absoluteFilePathToZip">Full path to the .zip file</param>
        /// <param name="itemIdToImport">ID of manifest item to import. If null, root organization is imported</param>
        /// <param name="permissionDomain">An permission domain to associate this course with,
        /// for ftp access service (see ftp service below).
        /// If the domain specified does not exist, the course will be placed in the default permission domain</param>
        /// <returns>List of Import Results</returns>
        public List <ImportResult> ImportCourse(string courseId, string absoluteFilePathToZip,
                                                string itemIdToImport, string permissionDomain)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            if (!String.IsNullOrEmpty(itemIdToImport))
            {
                request.Parameters.Add("itemid", itemIdToImport);
            }
            if (!String.IsNullOrEmpty(itemIdToImport))
            {
                request.Parameters.Add("pd", permissionDomain);
            }
            request.FileToPost = absoluteFilePathToZip;
            XmlDocument response = request.CallService("rustici.course.importCourse");

            return(ImportResult.ConvertToImportResults(response));
        }
        private IList <string> getLearnerTags(string learnerId)
        {
            IList <string> tags = new List <string>();

            ServiceRequest req = svc.CreateNewRequest();

            req.Parameters.Add("learnerid", learnerId);
            XmlDocument rsp          = req.CallService("rustici.tagging.getLearnerTags");
            XmlNode     responseNode = rsp.SelectSingleNode(@"/rsp[@stat='ok']");

            Assert.IsNotNull(responseNode, rsp.OuterXml);
            XmlNodeList tagNodes = responseNode.SelectNodes(@"tags/tag");

            foreach (XmlNode tagNode in tagNodes)
            {
                tags.Add(tagNode.InnerText);
            }

            return(tags);
        }
Example #29
0
        /// <summary>
        /// Create a new Registration (Instance of a user taking a course)
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        /// <param name="courseId">Unique Identifier for the course</param>
        /// <param name="learnerId">Unique Identifier for the learner</param>
        /// <param name="learnerFirstName">Learner's first name</param>
        /// <param name="learnerLastName">Learner's last name</param>
        /// /// <param name="learnerTags">Learner Tags</param> "tag1|tag2|tag3"
        public void CreateRegistrationWithTags(string registrationId, string courseId, string learnerId,
                                               string learnerFirstName, string learnerLastName, string email, string registrationTags)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("regid", registrationId);
            request.Parameters.Add("courseid", courseId);
            request.Parameters.Add("fname", learnerFirstName);
            request.Parameters.Add("lname", learnerLastName);
            request.Parameters.Add("email", email);
            request.Parameters.Add("learnerid", learnerId);

            // Optional tags
            if (!String.IsNullOrEmpty(registrationTags))
            {
                request.Parameters.Add("registrationTags", registrationTags);
            }

            request.CallService("rustici.registration.createRegistration");
        }
Example #30
0
        /// <summary>
        /// List of existing dispatch in your account. Callers should assume
        /// another page of data is available by calling again with the page parameter
        /// incremented, until an empty list is returned.
        /// </summary>
        /// <param name="page">Which page of results to return. Page numbers start at 1.</param>
        /// <param name="destinationId">Show only dispatches belonging to the destination named by this id.</param>
        /// <param name="courseId">Show only dispatches for the course named by this id.</param>
        /// <param name="tags">A comma separated list of tags to filter results by. Results must be tagged with every tag in the list.</param>
        /// <returns>List of Destination Data objects.</returns>
        public List <DispatchData> GetDispatchList(int page, string destinationId, string courseId, string tags)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("page", page);
            if (!string.IsNullOrEmpty(destinationId))
            {
                request.Parameters.Add("destinationid", destinationId);
            }
            if (!string.IsNullOrEmpty(courseId))
            {
                request.Parameters.Add("courseid", courseId);
            }
            if (!string.IsNullOrEmpty(tags))
            {
                request.Parameters.Add("tags", tags);
            }
            XmlDocument response = request.CallService("rustici.dispatch.getDispatchList");

            return(DispatchData.ConvertToDispatchDataList(response));
        }
Example #31
0
        public String ImportUploadedCourseAsync(string courseId, string path, string itemIdToImport, string permissionDomain)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("courseid", courseId);
            request.Parameters.Add("path", path);
            if (!String.IsNullOrEmpty(itemIdToImport))
            {
                request.Parameters.Add("itemid", itemIdToImport);
            }
            if (!String.IsNullOrEmpty(permissionDomain))
            {
                request.Parameters.Add("pd", permissionDomain);
            }
            XmlDocument response = request.CallService("rustici.course.importCourseAsync");
            String      tokenId  = ((XmlElement)response
                                    .GetElementsByTagName("token")[0])
                                   .FirstChild.InnerText;

            return(tokenId);
        }
Example #32
0
        /// <summary>
        /// Retrieve the list of course attributes associated with a specific version
        /// of the specified course.
        /// </summary>
        /// <param name="courseId">Unique Identifier for the course</param>
        /// <param name="versionId">Specific version the specified course</param>
        /// <returns>Dictionary of all attributes associated with this course</returns>
        public Dictionary <string, string> GetAttributes(string courseId, int versionId)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("courseid", courseId);
            if (versionId != Int32.MinValue)
            {
                request.Parameters.Add("versionid", versionId);
            }
            XmlDocument response = request.CallService("rustici.course.getAttributes");

            // Map the response to a dictionary of name/value pairs
            Dictionary <string, string> attributeDictionary = new Dictionary <string, string>();

            foreach (XmlElement attrEl in response.GetElementsByTagName("attribute"))
            {
                attributeDictionary.Add(attrEl.Attributes["name"].Value, attrEl.Attributes["value"].Value);
            }

            return(attributeDictionary);
        }
Example #33
0
        /// <summary>
        /// Delete the selected dispatches from your SCORM Cloud account, using the parameters given.
        /// Selection of dispatches to delete is based either on a specific dispatch using the
        /// dispatchid parameter, or groups of dispatches using the destinationid, courseid, or
        /// tags parameters in any combination.
        /// </summary>
        /// <param name="dispatchId">The id of the dispatch being deleted.</param>
        /// <param name="destinationId">The id of the destination used to select the dispatch group to delete.</param>
        /// <param name="courseId">The id of the course used to select the dispatch group to delete.</param>
        /// <param name="tags">A comma separated list of tags used to select the dispatch group to delete. Each dispatch selected will have to be tagged with each tag in the list.</param>
        public void DeleteDispatches(string dispatchId, string destinationId, string courseId, string tags)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            if (!string.IsNullOrEmpty(dispatchId))
            {
                request.Parameters.Add("dispatchid", dispatchId);
            }
            if (!string.IsNullOrEmpty(destinationId))
            {
                request.Parameters.Add("destinationid", destinationId);
            }
            if (!string.IsNullOrEmpty(courseId))
            {
                request.Parameters.Add("courseid", courseId);
            }
            if (!string.IsNullOrEmpty(tags))
            {
                request.Parameters.Add("tags", tags);
            }

            request.CallService("rustici.dispatch.deleteDispatches");
        }
Example #34
0
        /// <summary>
        /// Create a new Registration (Instance of a user taking a course)
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        /// <param name="courseId">Unique Identifier for the course</param>
        /// <param name="versionId">Optional versionID, if Int32.MinValue, latest course version is used.</param>
        /// <param name="learnerId">Unique Identifier for the learner</param>
        /// <param name="learnerFirstName">Learner's first name</param>
        /// <param name="learnerLastName">Learner's last name</param>
        /// <param name="resultsPostbackUrl">URL to which the server will post results back to</param>
        /// <param name="authType">Type of Authentication used at results postback time</param>
        /// <param name="postBackLoginName">If postback authentication is used, the logon name</param>
        /// <param name="postBackLoginPassword">If postback authentication is used, the password</param>
        /// <param name="resultsFormat">The Format of the results XML sent to the postback URL</param>
        public void CreateRegistration(string registrationId, string courseId, int versionId, string learnerId,
                                       string learnerFirstName, string learnerLastName, string resultsPostbackUrl,
                                       RegistrationResultsAuthType authType, string postBackLoginName, string postBackLoginPassword,
                                       RegistrationResultsFormat resultsFormat)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("regid", registrationId);
            request.Parameters.Add("courseid", courseId);
            request.Parameters.Add("fname", learnerFirstName);
            request.Parameters.Add("lname", learnerLastName);
            request.Parameters.Add("learnerid", learnerId);

            // Required on this signature but not by the actual service
            request.Parameters.Add("authtype", Enum.GetName(authType.GetType(), authType).ToLower());
            request.Parameters.Add("resultsformat", Enum.GetName(resultsFormat.GetType(), resultsFormat).ToLower());

            // Optional:
            if (!String.IsNullOrEmpty(resultsPostbackUrl))
            {
                request.Parameters.Add("postbackurl", resultsPostbackUrl);
            }
            if (!String.IsNullOrEmpty(postBackLoginName))
            {
                request.Parameters.Add("urlname", postBackLoginName);
            }
            if (!String.IsNullOrEmpty(postBackLoginPassword))
            {
                request.Parameters.Add("urlpass", postBackLoginPassword);
            }
            if (versionId != Int32.MinValue)
            {
                request.Parameters.Add("versionid", versionId);
            }

            request.CallService("rustici.registration.createRegistration");
        }
Example #35
0
        /// <summary>
        /// This method provides a way to test a URL for posting registration results back to, as they would be posted when using the postbackurl in the createRegistration call. When called, an example registration result will be posted to the URL given, or else an error will be reported regarding why the post failed.
        /// </summary>
        /// <param name="postbackUrl">Specifies a URL for which to post activity and status data in real time as the course is completed</param>
        /// <param name="authType">Optional parameter to specify how to authorize against the given postbackurl, can be "form" or "httpbasic". If form authentication, the username and password for authentication are submitted as form fields "username" and "password", and the registration data as the form field "data". If httpbasic authentication is used, the username and password are placed in the standard Authorization HTTP header, and the registration data is the body of the message (sent as text/xml content type). This field is set to "form" by default.</param>
        /// <param name="urlname">You can optionally specify a login name to be used for credentials when posting to the URL specified in postbackurl</param>
        /// <param name="urlpass">If credentials for the postbackurl are provided, this must be included, it is the password to be used in authorizing the postback of data to the URL specified by postbackurl</param>
        /// <param name="resultsFormat">This parameter allows you to specify a level of detail in the information that is posted back while the course is being taken. It may be one of three values: "course" (course summary), "activity" (activity summary, or "full" (full detail), and is set to "course" by default. The information will be posted as xml, and the format of that xml is specified below under the method "getRegistrationResult"</param>
        /// <returns>Rsp containing result and status code</returns>
        public Rsp TestRegistrationPostUrl(string postbackUrl, RegistrationResultsAuthType authType, string urlname, string urlpass, RegistrationResultsFormat resultsFormat)
        {
            ServiceRequest request = new ServiceRequest(configuration);

            request.Parameters.Add("postbackurl", postbackUrl);

            if (!String.IsNullOrEmpty(urlname))
            {
                request.Parameters.Add("urlname", urlname);
            }

            if (!String.IsNullOrEmpty(urlpass))
            {
                request.Parameters.Add("urlpass", urlpass);
            }

            request.Parameters.Add("authtype", Enum.GetName(authType.GetType(), authType).ToLower());
            request.Parameters.Add("resultsformat", Enum.GetName(resultsFormat.GetType(), resultsFormat).ToLower());

            XmlDocument response   = request.CallService("rustici.registration.testRegistrationPostUrl");
            XmlElement  rspElement = ((XmlElement)response.GetElementsByTagName("rsp")[0]);

            return(new Rsp(rspElement));
        }
        public void getAccountInfo()
        {
            ServiceRequest req = new ServiceRequest(cfg);

            Console.WriteLine(req.CallService("rustici.reporting.getAccountInfo").OuterXml);
        }
        /// <summary>
        /// Get the status of any asynchronous jobs for sending private emails for an invite
        /// </summary>
        /// <param name="invitationId">invitation id of invite in question</param>
        /// <returns>job status value</returns>
        public String GetInvitationStatus(string invitationId) 
        {
		    ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("invitationId", invitationId);
            
            XmlDocument response = request.CallService("rustici.invitation.getInvitationStatus");
            return response.DocumentElement.InnerText;
		
        }
        /// <summary>
        /// This method provides a way to test a URL for posting registration results back to, as they would be posted when using the postbackurl in the createRegistration call. When called, an example registration result will be posted to the URL given, or else an error will be reported regarding why the post failed.
        /// </summary>
        /// <param name="postbackUrl">Specifies a URL for which to post activity and status data in real time as the course is completed</param>
        /// <param name="authType">Optional parameter to specify how to authorize against the given postbackurl, can be "form" or "httpbasic". If form authentication, the username and password for authentication are submitted as form fields "username" and "password", and the registration data as the form field "data". If httpbasic authentication is used, the username and password are placed in the standard Authorization HTTP header, and the registration data is the body of the message (sent as text/xml content type). This field is set to "form" by default.</param>
        /// <param name="urlname">You can optionally specify a login name to be used for credentials when posting to the URL specified in postbackurl</param>
        /// <param name="urlpass">If credentials for the postbackurl are provided, this must be included, it is the password to be used in authorizing the postback of data to the URL specified by postbackurl</param>
        /// <param name="resultsFormat">This parameter allows you to specify a level of detail in the information that is posted back while the course is being taken. It may be one of three values: "course" (course summary), "activity" (activity summary, or "full" (full detail), and is set to "course" by default. The information will be posted as xml, and the format of that xml is specified below under the method "getRegistrationResult"</param>
        /// <returns>Rsp containing result and status code</returns>
        public Rsp TestRegistrationPostUrl(string postbackUrl, RegistrationResultsAuthType authType, string urlname, string urlpass, RegistrationResultsFormat resultsFormat)
        {
            ServiceRequest request = new ServiceRequest(configuration);
              request.Parameters.Add("postbackurl", postbackUrl);

              //Api call will fail without a placeholder username and password at least:
              if (!String.IsNullOrEmpty(urlname))
              {
            request.Parameters.Add("name", urlname);
              }
              else
              {
            request.Parameters.Add("name", "placeholderLoginName");
              }

              if (!String.IsNullOrEmpty(urlpass))
              {
            request.Parameters.Add("password", urlpass);
              }
              else
              {
            request.Parameters.Add("password", "placeholderLoginPassword");
              }

              request.Parameters.Add("authtype", Enum.GetName(authType.GetType(), authType).ToLower());
              request.Parameters.Add("resultformat", Enum.GetName(resultsFormat.GetType(), resultsFormat).ToLower());

              XmlDocument response = request.CallService("rustici.registration.testRegistrationPostUrl");
              XmlElement rspElement = ((XmlElement)response.GetElementsByTagName("rsp")[0]);
              return new Rsp(rspElement);
        }
        /// <summary>
        /// Semantics: This method provides a way to update the postback settings for a registration created with the createRegistration call. If you wish to change an authenticated postback to an unauthenticated postback, please call this method with only a url specified.
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        /// <param name="courseId">Unique Identifier for the course</param>
        /// <param name="versionId">Optional versionID, if Int32.MinValue, latest course version is used.</param>
        /// <param name="learnerId">Unique Identifier for the learner</param>
        /// <param name="learnerFirstName">Learner's first name</param>
        /// <param name="learnerLastName">Learner's last name</param>
        /// <param name="resultsPostbackUrl">URL to which the server will post results back to</param>
        /// <param name="authType">Type of Authentication used at results postback time</param>
        /// <param name="postBackLoginName">If postback authentication is used, the logon name</param>
        /// <param name="postBackLoginPassword">If postback authentication is used, the password</param>
        /// <param name="resultsFormat">The Format of the results XML sent to the postback URL</param>
        public void UpdatePostbackInfo(string registrationId, string resultsPostbackUrl,
            string postBackLoginName, string postBackLoginPassword, RegistrationResultsAuthType authType,
            RegistrationResultsFormat resultsFormat)
        {
            ServiceRequest request = new ServiceRequest(configuration);
              request.Parameters.Add("regid", registrationId);
              request.Parameters.Add("url", "[" + HttpUtility.UrlEncode(resultsPostbackUrl) + "]");

              // Required on this signature but not by the actual service
              request.Parameters.Add("authtype", Enum.GetName(authType.GetType(), authType).ToLower());
              request.Parameters.Add("resultformat", Enum.GetName(resultsFormat.GetType(), resultsFormat).ToLower());

              // Optional:
              if (!String.IsNullOrEmpty(postBackLoginName))
              {
            request.Parameters.Add("name", postBackLoginName);
              }
              else
              {
            request.Parameters.Add("name", "PlaceholderName");
              }

              if (!String.IsNullOrEmpty(postBackLoginPassword))
              {
            request.Parameters.Add("password", postBackLoginPassword);
              }
              else
              {
            request.Parameters.Add("password", "PlaceholderPassword");
              }
              request.CallService("rustici.registration.updatePostbackInfo");
        }
        //TODO: Other overloads of createRegistration....

        /// <summary>
        /// Create a new Registration (Instance of a user taking a course).
        /// This particular overload is intended to support all possible input values with
        /// some sensible default values for less commonly used parameters.
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        /// <param name="courseId">Unique Identifier for the course</param>
        /// <param name="learnerId">Unique Identifier for the learner</param>
        /// <param name="learnerFirstName">Learner's first name</param>
        /// <param name="learnerLastName">Learner's last name</param>
        /// <param name="resultsPostbackUrl">URL to which the server will post results back to</param>
        /// <param name="authType">Type of Authentication used at results postback time</param>
        /// <param name="postBackLoginName">If postback authentication is used, the logon name</param>
        /// <param name="postBackLoginPassword">If postback authentication is used, the password</param>
        /// <param name="resultsFormat">The Format of the results XML sent to the postback URL</param>
        /// <param name="email">Learner's email</param>
        /// <param name="versionId">Optional versionID, if Int32.MinValue, latest course version is used.</param>
        /// <param name="learnerTags">A comma separated list of learner tags to associate with this registration</param>
        /// <param name="courseTags">A comma separated list of course tags to associate with this registration</param>
        /// <param name="registrationTags">A comma separated list of tags to associate with this registration</param>
        public void CreateRegistration(
            string registrationId,
            string courseId,
            string learnerId,
            string learnerFirstName,
            string learnerLastName,
            string resultsPostbackUrl,
            RegistrationResultsAuthType authType    = RegistrationResultsAuthType.FORM,
            string postBackLoginName                = "",
            string postBackLoginPassword            = "",
            RegistrationResultsFormat resultsFormat = RegistrationResultsFormat.COURSE,
            string email            = "",
            int versionId           = Int32.MinValue,
            string learnerTags      = "",
            string courseTags       = "",
            string registrationTags = "")
        {
            ServiceRequest request = new ServiceRequest(configuration);

            // Required:
            request.Parameters.Add("regid", registrationId);
            request.Parameters.Add("courseid", courseId);
            request.Parameters.Add("learnerid", learnerId);
            request.Parameters.Add("fname", learnerFirstName);
            request.Parameters.Add("lname", learnerLastName);

            // Optional:

            if (!String.IsNullOrEmpty(resultsPostbackUrl))
            {
                request.Parameters.Add("postbackurl", resultsPostbackUrl);
                request.Parameters.Add("authtype", Enum.GetName(authType.GetType(), authType).ToLower());
            }
            if (!String.IsNullOrEmpty(postBackLoginName))
            {
                request.Parameters.Add("urlname", postBackLoginName);
            }
            if (!String.IsNullOrEmpty(postBackLoginPassword))
            {
                request.Parameters.Add("urlpass", postBackLoginPassword);
            }

            request.Parameters.Add("resultsformat", Enum.GetName(resultsFormat.GetType(), resultsFormat).ToLower());

            if (!String.IsNullOrEmpty(email))
            {
                request.Parameters.Add("email", email);
            }
            if (versionId != Int32.MinValue)
            {
                request.Parameters.Add("versionid", versionId);
            }

            // Optional tags
            if (!String.IsNullOrEmpty(learnerTags))
            {
                request.Parameters.Add("learnerTags", learnerTags);
            }
            if (!String.IsNullOrEmpty(courseTags))
            {
                request.Parameters.Add("courseTags", courseTags);
            }
            if (!String.IsNullOrEmpty(registrationTags))
            {
                request.Parameters.Add("registrationTags", registrationTags);
            }

            request.CallService("rustici.registration.createRegistration");
        }
 /// <summary>
 /// Returns list of launch info objects, each of which describe a particular launch,
 /// but note, does not include the actual history log for the launch. To get launch
 /// info including the log, use GetLaunchInfo
 /// </summary>
 /// <param name="registrationId"></param>
 /// <returns></returns>
 public List<LaunchInfo> GetLaunchHistory(string registrationId)
 {
     ServiceRequest request = new ServiceRequest(configuration);
       request.Parameters.Add("regid", registrationId);
       XmlDocument response = request.CallService("rustici.registration.getLaunchHistory");
       XmlElement launchHistory = ((XmlElement)response.GetElementsByTagName("launchhistory")[0]);
       return LaunchInfo.ConvertToLaunchInfoList(launchHistory);
 }
 /// <summary>
 /// Return a registration summary object for the given registration
 /// </summary>
 /// <param name="registrationId">The unique identifier of the registration</param>
 /// <returns></returns>
 public RegistrationSummary GetRegistrationSummary(string registrationId)
 {
     ServiceRequest request = new ServiceRequest(configuration);
       request.Parameters.Add("regid", registrationId);
       request.Parameters.Add("resultsformat", "course");
       request.Parameters.Add("dataformat", "xml");
       XmlDocument response = request.CallService("rustici.registration.getRegistrationResult");
       XmlElement reportElem = (XmlElement)response.GetElementsByTagName("registrationreport")[0];
       return new RegistrationSummary(reportElem);
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="courseId">courseId of the course invited to</param>
        /// <param name="publicInvitation">whether the invite is public</param>
        /// <param name="send">whether to send the nvite</param>
        /// <param name="addresses">comma-separated list of email addresses to sent he invite to</param>
        /// <param name="emailSubject">subject of the email</param>
        /// <param name="emailBody">message body of the email</param>
        /// <param name="creatingUserEmail">email of the SCORM Cloud user creating the invite</param>
        /// <param name="registrationCap">the max number of public invitations to make available</param>
        /// <param name="postbackUrl">url to post back invite regs to</param>
        /// <param name="authType">auth type for postbacks</param>
        /// <param name="urlName">username for postbacks</param>
        /// <param name="urlPass">password for postbacks</param>
        /// <param name="resultsFormat">results format for postbacks</param>
        /// <param name="async">whether to send the (private) invites asynchronously</param>
        /// <returns>new invitation id</returns>
        public string CreateInvitation(string courseId, bool publicInvitation, bool send,
            string addresses, string emailSubject, string emailBody, string creatingUserEmail, int registrationCap,
            string postbackUrl, string authType, string urlName, string urlPass, string resultsFormat,
            bool async)
        {
            ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("courseid", courseId);
            request.Parameters.Add("public", publicInvitation.ToString().ToLower());
            request.Parameters.Add("send", send.ToString().ToLower());
        
            request.Parameters.Add("registrationCap", registrationCap);
            
            if (addresses != null && addresses.Length > 0)
                request.Parameters.Add("addresses", addresses);
            if (emailSubject != null && emailSubject.Length > 0)
                request.Parameters.Add("emailSubject", emailSubject);
            if (emailBody != null && emailBody.Length > 0)
                request.Parameters.Add("emailBody", emailBody);
            if (creatingUserEmail != null && creatingUserEmail.Length > 0)
                request.Parameters.Add("creatingUserEmail", creatingUserEmail);
            if (postbackUrl != null && postbackUrl.Length > 0)
                request.Parameters.Add("postbackurl", postbackUrl);
            if (authType != null && authType.Length > 0)
                request.Parameters.Add("authtype", authType);
            if (urlName != null && urlName.Length > 0)
                request.Parameters.Add("urlname", urlName);
            if (urlPass != null && urlPass.Length > 0)
                request.Parameters.Add("urlpass", urlPass);
            if (resultsFormat != null && resultsFormat.Length > 0)
                request.Parameters.Add("resultsformat", resultsFormat);
        
            if (async){
        	    return request.CallService("rustici.invitation.createInvitationAsync").DocumentElement.InnerText;
            } else {
                return request.CallService("rustici.invitation.createInvitation").DocumentElement.InnerText;
            }

        }
        /// <summary>
        /// Returns a list of registration id's along with their associated course
        /// </summary>
        /// <param name="regIdFilterRegex">Optional registration id filter</param>
        /// <param name="courseIdFilterRegex">Option course id filter</param>
        /// <returns></returns>
        public List<RegistrationData> GetRegistrationList(string regIdFilterRegex, string courseIdFilterRegex, bool courseIdIsExact, DateTime? after, DateTime? until)
        {
            ServiceRequest request = new ServiceRequest(configuration);
              if (!String.IsNullOrEmpty(regIdFilterRegex))
            request.Parameters.Add("filter", regIdFilterRegex);
              if (!String.IsNullOrEmpty(courseIdFilterRegex))
              {
            request.Parameters.Add((courseIdIsExact ? "courseid" : "coursefilter"), courseIdFilterRegex);
              }
              if (after != null)
            request.Parameters.Add("after", after.GetValueOrDefault().ToUniversalTime());
              if (until != null)
            request.Parameters.Add("until", until.GetValueOrDefault().ToUniversalTime());

              XmlDocument response = request.CallService("rustici.registration.getRegistrationList");

              // Return the subset of the xml starting with the top <summary>
              return RegistrationData.ConvertToRegistrationDataList(response);
        }
        /// <summary>
        /// Returns the current state of the registration, including completion
        /// and satisfaction type data.  Amount of detail depends on format parameter.
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        /// <param name="resultsFormat">Degree of detail to return</param>
        /// <returns>Registration data in XML Format</returns>
        public string GetRegistrationResult(string registrationId, RegistrationResultsFormat resultsFormat, DataFormat dataFormat)
        {
            ServiceRequest request = new ServiceRequest(configuration);
              request.Parameters.Add("regid", registrationId);
              request.Parameters.Add("resultsformat", Enum.GetName(resultsFormat.GetType(), resultsFormat).ToLower());
              if (dataFormat == DataFormat.JSON)
            request.Parameters.Add("dataformat", "json");
              XmlDocument response = request.CallService("rustici.registration.getRegistrationResult");

              // Return the subset of the xml starting with the top <summary>
              return response.ChildNodes[1].InnerXml;
        }
        /// <summary>
        /// Return a registration detail object for the given registration
        /// </summary>
        /// <param name="registrationId">The unique identifier of the registration</param>
        /// <returns></returns>
        public RegistrationData GetRegistrationDetail(string registrationId)
        {
            ServiceRequest request = new ServiceRequest(configuration);

              request.Parameters.Add("regid", registrationId);

              XmlDocument response = request.CallService("rustici.registration.getRegistrationDetail");

              XmlElement reportElem = (XmlElement)response.GetElementsByTagName("registration")[0];

              return new RegistrationData(reportElem);
        }
 /// <summary>
 ///  Get the postback attributes that were set in a createRegistration or updatePostbackInfo call.
 /// </summary>
 /// <param name="registrationId">Specifies the registration id</param>
 /// <returns>PostackInfo</returns>
 public PostbackInfo GetPostbackInfo(string registrationId)
 {
     ServiceRequest request = new ServiceRequest(configuration);
       request.Parameters.Add("regid", registrationId);
       XmlDocument response = request.CallService("rustici.registration.getPostbackInfo");
       XmlElement postbackInfoElem = ((XmlElement)response.GetElementsByTagName("postbackinfo")[0]);
       return new PostbackInfo(postbackInfoElem);
 }
 /// <summary>
 /// Get the full launch information for the launch with the given launch id
 /// </summary>
 /// <param name="launchId"></param>
 /// <returns></returns>
 public LaunchInfo GetLaunchInfo(string launchId)
 {
     ServiceRequest request = new ServiceRequest(configuration);
       request.Parameters.Add("launchid", launchId);
       XmlDocument response = request.CallService("rustici.registration.getLaunchInfo");
       XmlElement launchInfoElem = ((XmlElement)response.GetElementsByTagName("launch")[0]);
       return new LaunchInfo(launchInfoElem);
 }
        /// <summary>
        /// Get the invitation info for the invite
        /// </summary>
        /// <param name="invitationId">invitationId of invite inquiring about</param>
        /// <param name="includeRegistrationSummary">whether to include reg summaries for any user invitations returned</param>
        /// <returns>invitation info object</returns>
        public InvitationInfo GetInvitationInfo(string invitationId, bool includeRegistrationSummary) 
        {
            ServiceRequest request = new ServiceRequest(configuration);
            request.Parameters.Add("invitationId", invitationId);
            request.Parameters.Add("detail", includeRegistrationSummary.ToString().ToLower());

            XmlDocument response = request.CallService("rustici.invitation.getInvitationInfo");
            return new InvitationInfo((XmlElement)response.GetElementsByTagName("invitationInfo").Item(0));
	    }
        // <summary>
        /// Confirm that a registrationExists
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        public bool RegistrationExists(string registrationId)
        {
            ServiceRequest request = new ServiceRequest(configuration);
              request.Parameters.Add("regid", registrationId);
              XmlDocument response = request.CallService("rustici.registration.exists");

              XmlElement attrEl = (XmlElement)response.GetElementsByTagName("result")[0];

              return Convert.ToBoolean(attrEl.InnerXml.ToString());
        }
    	/// <summary>
    	/// Get a list of invitations that meet the filtering criteria.  no filtering will return all
    	/// </summary>
    	/// <param name="invFilter">filter for the invitation id</param>
    	/// <param name="coursefilter">filter for the courseId</param>
    	/// <returns>a list of InvitationInfo objects</returns>
	    public List<InvitationInfo> GetInvitationList(String invFilter, String coursefilter)
        {
		    ServiceRequest request = new ServiceRequest(configuration);
		    if (invFilter != null) {
                request.Parameters.Add("filter", invFilter);
            }
            if (coursefilter != null) {
                request.Parameters.Add("coursefilter", coursefilter);
            }

            XmlDocument response = request.CallService("rustici.invitation.getInvitationList");
            return InvitationInfo.parseListFromXml(response);
        }
 /// <summary>
 /// Create a new Registration (Instance of a user taking a course)
 /// </summary>
 /// <param name="registrationId">Unique Identifier for the registration</param>
 /// <param name="courseId">Unique Identifier for the course</param>
 /// <param name="learnerId">Unique Identifier for the learner</param>
 /// <param name="learnerFirstName">Learner's first name</param>
 /// <param name="learnerLastName">Learner's last name</param>
 /// <param name="email">Learner's email</param>
 public void CreateRegistration(string registrationId, string courseId, string learnerId,
     string learnerFirstName, string learnerLastName, string email)
 {
     ServiceRequest request = new ServiceRequest(configuration);
       request.Parameters.Add("regid", registrationId);
       request.Parameters.Add("courseid", courseId);
       request.Parameters.Add("fname", learnerFirstName);
       request.Parameters.Add("lname", learnerLastName);
       request.Parameters.Add("learnerid", learnerId);
       request.Parameters.Add("email", email);
       request.CallService("rustici.registration.createRegistration");
 }
        /// <summary>
        /// Create a new Registration (Instance of a user taking a course)
        /// </summary>
        /// <param name="registrationId">Unique Identifier for the registration</param>
        /// <param name="courseId">Unique Identifier for the course</param>
        /// <param name="learnerId">Unique Identifier for the learner</param>
        /// <param name="learnerFirstName">Learner's first name</param>
        /// <param name="learnerLastName">Learner's last name</param>
        /// /// <param name="learnerTags">Learner Tags</param> "tag1|tag2|tag3"
        public void CreateRegistrationWithTags(string registrationId, string courseId, string learnerId,
            string learnerFirstName, string learnerLastName, string email, string registrationTags)
        {
            ServiceRequest request = new ServiceRequest(configuration);
              request.Parameters.Add("regid", registrationId);
              request.Parameters.Add("courseid", courseId);
              request.Parameters.Add("fname", learnerFirstName);
              request.Parameters.Add("lname", learnerLastName);
              request.Parameters.Add("email", email);
              request.Parameters.Add("learnerid", learnerId);

              // Optional tags
              if (!String.IsNullOrEmpty(registrationTags))
            request.Parameters.Add("registrationTags", registrationTags);

              request.CallService("rustici.registration.createRegistration");
        }
 /// <summary>
 /// Resets all status data regarding the specified registration -- essentially restarts the course
 /// </summary>
 /// <param name="registrationId">Unique Identifier for the registration</param>
 public void ResetRegistration(string registrationId)
 {
     ServiceRequest request = new ServiceRequest(configuration);
       request.Parameters.Add("regid", registrationId);
       request.CallService("rustici.registration.resetRegistration");
 }
 /// <summary>
 /// Clears global objective data for the given registration
 /// </summary>
 /// <param name="registrationId">Unique Identifier for the registration</param>
 /// <param name="deleteLatestInstanceOnly">If false, all instances are deleted</param>
 public void ResetGlobalObjectives(string registrationId, bool deleteLatestInstanceOnly)
 {
     ServiceRequest request = new ServiceRequest(configuration);
       request.Parameters.Add("regid", registrationId);
       if (deleteLatestInstanceOnly)
     request.Parameters.Add("instanceid", "latest");
       request.CallService("rustici.registration.resetGlobalObjectives");
 }
 /// <summary>
 /// Delete the specified instance of the registration
 /// </summary>
 /// <param name="registrationId">Unique Identifier for the registration</param>
 /// <param name="instanceId">Specific instance of the registration to delete</param>
 public void DeleteRegistrationInstance(string registrationId, int instanceId)
 {
     ServiceRequest request = new ServiceRequest(configuration);
       request.Parameters.Add("regid", registrationId);
       request.Parameters.Add("instanceid", "instanceId");
       request.CallService("rustici.registration.deleteRegistration");
 }