Skip to main content

A plugin that auto saves the course OLX to git when an author publishes it

Project description

Installation

For detailed installation instructions, please refer to the plugin installation guide.

Installation required in:

  • Studio (CMS)

Configuration

  • Enable the following FEATURES flags in the config file in Open edX. For any release after Juniper, that config file is /edx/etc/cms.yml. If you’re using private.py, you will need to enable these FEATURES in cms/envs/private.py.

    "FEATURES": {
        "ENABLE_EXPORT_GIT": true,
        "ENABLE_AUTO_GITHUB_REPO_CREATION": true  # Optional, to auto create github repo for new courses
    }
    # Set when ENABLE_AUTO_GITHUB_REPO_CREATION is true
    GITHUB_ORG_API_URL = "https://api.github.com/orgs/<GITHUB_ORG_NAME>"  # For GitHub Enterprise, change the URL accordingly
    GITHUB_ACCESS_TOKEN = "<GITHUB_PERSONAL_ACCESS_TOKEN>"  # Token must have 'repo - Full control of private repositories' permission
  • Set your commit user in cms/envs/common.py, if you don’t want to use the default one

    GIT_EXPORT_DEFAULT_IDENT = {
        'name': 'STUDIO_EXPORT_TO_GIT',
        'email': 'STUDIO_EXPORT_TO_GIT@example.com'
    }
  • Restart the server using make studio-restart on Devstack or tutor dev/local restart openedx on Tutor.

  • For Tutor installations, these values can also be managed through a custom tutor plugin.

Setup github authentication for plugin

If you’re testing from a docker machine running devstack setup github authentication for plugin, you’ll need to generate SSH keys in that machine and add them to your Github account (https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ - https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account)

Studio/CMS UI settings

  • Open studio admin at /admin/ol_openedx_git_auto_export/coursegitrepository/

  • Add your course_id and in the GIT URL, add your OLX git repo. For example git@github.com:<GITHUB_USERNAME>/edx4edxlite.git.

  • Make a change to the course content and publish.
    • When using Tutor, attach with the CMS container using tutor dev/local start cms and enter yes to the prompt to add the GitHub to known hosts.

    • You should see a new commit in your OLX repo.

    • Commit user should be the one that published the change.

    • If user is not available, it should be the default one set in GIT_EXPORT_DEFAULT_IDENT.

  • Test commit count increase on your OLX repo.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ol_openedx_git_auto_export-0.7.2.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ol_openedx_git_auto_export-0.7.2-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file ol_openedx_git_auto_export-0.7.2.tar.gz.

File metadata

File hashes

Hashes for ol_openedx_git_auto_export-0.7.2.tar.gz
Algorithm Hash digest
SHA256 e82ed5cefe9dcaf7647a521f45d2085c80b7bd7ef3efc578fb588d7970eca8ea
MD5 c20cbfb64483fa213d1f1b814a31be29
BLAKE2b-256 bd7886460c1fc0f4f9e8196243219b5d54b8dfa3b9786d2d54b2ab5e13994cea

See more details on using hashes here.

File details

Details for the file ol_openedx_git_auto_export-0.7.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ol_openedx_git_auto_export-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e09b77274991727208b76be09794c30c0a234ad32fd5f23209afebeb22673cb5
MD5 55ac65285f558c0d54e466464df28cba
BLAKE2b-256 e7846bf5f49a9d073698980bdc81b48180064e22d1fee56b4b1c76a6f8eb6040

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page