Finding course package

Mahdi.A.768
Mahdi.A.768 Posts: 2 New Community Member
In this tutorial, https://docs.valence.desire2learn.com/samples/contentPkg.html,
two items are needed for accessing the course data.

1. course-package: Absolute path location of the course package to import
2. course-offering-id: D2L system identifier for the course offering to receive the import

I found out how to get the course offering ID in D2L, but how can I find the course package for a course?

# handle command line args
parser = argparse.ArgumentParser()
parser.add_argument('--course-package', type=str, required=True,
help='Absolute path location of the course package to import')
parser.add_argument('--course-offering-id', type=str, required=True,
help='D2L system identifier for the course offering to receive the import')
parser.add_argument('--job-token', type=str,
help='Job token if you just want to check on status of a known import job')
args = parser.parse_args()

Answers

  • This is a very old sample and needs to be followed with caution as it makes reference to a Python package that's no long supported and an auth mechanism that people should not use (and rather use OAuth2 by preference). That said, the expectation is that the course package file is one you've got at hand that was exported from Brightspace itself using the application UI.

  • brad.r.503
    brad.r.503 Posts: 35
    To find the course package for a course in D2L Brightspace, you typically need to export the course content first. The course package refers to an exported file (often in a format like IMS Common Cartridge or SCORM) that contains the course materials and structure. This package can then be imported into another course offering.

    Here's how you can export a course package in D2L Brightspace:

    Access Course Admin: Log in to your D2L Brightspace environment and navigate to the course you want to export. In the course, locate and click on the Course Admin link, usually found in the navigation bar.

    Export Course Components: In the Course Administration area, look for an option labeled Import / Export / Copy Components. Click on this to access the course components export feature.

    Select Components to Export: Choose Export Components and select the specific components of the course you wish to export. You can select all components or specific items depending on your needs.

    Export Process: Follow the prompts to start the export process. D2L will package the selected components into a downloadable file.

    Download the Exported Package: Once the export process is complete, you will receive a notification, and a link to download the exported package will be provided. The download will typically be a ZIP file.

    Locate the Absolute Path: After downloading the course package to your computer, you'll need to determine its absolute path. The absolute path is the full path to the file on your computer or server, starting from the root directory.

    On Windows, an absolute path might look like C:\Users\YourName\Downloads\course_package.zip.
    On macOS or Linux, it might look like /Users/YourName/Downloads/course_package.zip.
    Use in Script: Once you have the absolute path, you can use it as the argument for --course-package in your script.

    Note: The course package is generally used for transferring course content between courses or instances within the D2L environment. If your intention is to access or manipulate course data programmatically (e.g., grades, user data), you might need to use the D2L Valence API directly, rather than exporting and importing course packages.

    Also, ensure that you have the necessary permissions to export course content, as this feature might be restricted based on your user role within D2L Brightspace.
  • brad.r.503
    brad.r.503 Posts: 35
    To find the course package for a course in D2L Brightspace, you typically need to export the course content first. The course package refers to an exported file (often in a format like IMS Common Cartridge or SCORM) that contains the course materials and structure. This package can then be imported into another course offering.

    Here's how you can export a course package in D2L Brightspace:

    Access Course Admin: Log in to your D2L Brightspace environment and navigate to the course you want to export. In the course, locate and click on the Course Admin link, usually found in the navigation bar.

    Export Course Components: In the Course Administration area, look for an option labeled Import / Export / Copy Components. Click on this to access the course components export feature.

    Select Components to Export: Choose Export Components and select the specific components of the course you wish to export. You can select all components or specific items depending on your needs.

    Export Process: Follow the prompts to start the export process. D2L will package the selected components into a downloadable file.

    Download the Exported Package: Once the export process is complete, you will receive a notification, and a link to download the exported package will be provided. The download will typically be a ZIP file.

    Locate the Absolute Path: After downloading the course package to your computer, you'll need to determine its absolute path. The absolute path is the full path to the file on your computer or server, starting from the root directory.

    On Windows, an absolute path might look like C:\Users\YourName\Downloads\course_package.zip.
    On macOS or Linux, it might look like /Users/YourName/Downloads/course_package.zip.
    Use in Script: Once you have the absolute path, you can use it as the argument for --course-package in your script.

    Note: The course package is generally used for transferring course content between courses or instances within the D2L environment. If your intention is to access or manipulate course data programmatically (e.g., grades, user data), you might need to use the D2L Valence API directly, rather than exporting and importing course packages.

    Also, ensure that you have the necessary permissions to export course content, as this feature might be restricted based on your user role within D2L Brightspace.