Skip to content

Instantly share code, notes, and snippets.

@ariestiyansyah
Created March 18, 2019 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ariestiyansyah/544489f9936c3d88d596d5791e562c42 to your computer and use it in GitHub Desktop.
Save ariestiyansyah/544489f9936c3d88d596d5791e562c42 to your computer and use it in GitHub Desktop.
Open edX Certificate
#!/bin/bash
# change directory to edx-platform
cd /edx/app/edxapp/edx-platform
# prompt user, and read command line argument
read -p 'Enter course ID: ' idcourse
read -p "Rizky, Are you sure you want to generate the certificate (Y/N)? " answer
# handle the command line argument we were given
while true
do
case $answer in
[yY]* ) echo "Okay Rizky, Start generating $idcourse "
sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws ungenerated_certs -c $idcourse --insecure
break;;
[nN]* ) exit;;
* ) echo "Please select Y or N."; break ;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment