This article walks you though use of the 'GetPackageVersion' batch file to pull down SCORM Courses from the Course Module in the Convercent application. From there, the course can be tested at cloud.scorm.com.
Note: Make sure the courses you are trying to pull down have been PUBLISHED. The script will not pull down a package that has been archived or unpublished.
- VDI Access - Environments.xlsx
- Access to this directory in VDI: E:\SoSu\GetPackageVersion.SupportA\GetPackageVersion.SupportA
- OrganizationId for the Organization you are troubleshooting
- Package ID for the package you want to pull down (or the name of the package you're working with)
There are two(2) files - a batch file, and a powershell script - that work together to retrieve the SCORM package for the organization.
The batch file 'GetPackageVersion.bat' executes the powershell script:
powershell -ExecutionPolicy RemoteSigned "& '%~dp0GetPackageVersion_ByOrgId.ps1' %*"
The powershell script 'GetPackageVersion_ByOrgId.ps1' connects to the EUSupport environment database and pulls down SCORM packages for the Organization Id you have specified in the body of the script.
$conn = new-object system.data.SqlClient.SqlConnection("Data Source=sp-eusup2-db00.QA.convercent.cloud,55022;Initial Catalog=Convercent;Trusted_Connection=True;");
$dataSet = new-object "System.Data.DataSet" "Docs"
$PackageVersionId = Read-Host -Prompt 'Please enter a package version id'
$query = "
,row_number() over (partition by d.FullName order by c.Modified desc) as 'row_number'
FROM [LearningManagement].[PackageVersion] pv
JOIN [DocumentManagement].[Document] d ON d.DocumentId = pv.DocumentId
JOIN [DocumentManagement].[DocumentVersion] v ON v.DocumentId = d.DocumentId
JOIN [DocumentManagement].[DocumentContent] c ON c.DocumentContentId = v.DocumentContentId AND d.DocumentId = c.DocumentId
WHERE pv.PackageVersionStatusId = 1 and d.OrganizationId = 'Enter Organization Id here'
[row_number] = 1
$dataAdapter = new-object "System.Data.SqlClient.SqlDataAdapter" ($query, $conn)
$dataAdapter.Fill($dataSet) | Out-Null
#Close the connection as soon as you are done with it
foreach ($row in $dataSet.Tables)
[io.file]::WriteAllBytes("E:\SoSu\GetPackageVersion.SupportA\GetPackageVersion.SupportA\" + $row, $row)
Write-Host $row + " failed"
1. Find the organization's Organization Id. Hold onto this id for later use.
2. Find the package Id you want to pull down in the Convercent app. You can find it as a part of the address in the URL bar:
Remember the name of this package so you can verify that it pulled down as expected (in later steps).
2. Navigate to the directory: 'E:\SoSu\GetPackageVersion.SupportA\GetPackageVersion.SupportA.' Open the powershell script by right clicking >Open with Notepad. In the body of the script (the WHERE clause), paste in the Organization Id. Save the powershell script.
3. Run the batch file. The following command prompt will open:
Because we've specified the OrganizationId in the body of the powershell script, entering the package version Id into the command prompt is unnecessary. Press the ENTER key to bypass this.
4. .Zip files named after the SCORM courses for the organization you've specified should now be present in the same directory as the script and batch files. Find the package you need and right click > copy it to a directory on your local machine for testing.
5. Sign into http://cloud.scorm.com with your account.
6. In the upper right hand corner of the home page, click the 'ADD CONTENT' button.
7. Choose the 'Import a SCORM, AICC, xAPI, or cmi5 package.'
7. Click the "Choose File" button and navigate to the directory on your local machine where you saved a copy of the SCORM zip file. Once the zip file is chosen, click "Import Course." A pop up screen will appear and display the progress of the upload. Do not navigate away from this screen.
8. When the course has been loaded, click the green LAUNCH button. Make sure pop ups are allowed in your browser so the SCORM course can start.