Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Run the command in your open edX instance.

    Code Block
    languagebash
    $ wget https://raw.githubusercontent.com/ariestiyansyah/OpenX/master/certificate-generate.sh


  2. Run the command below.

    Code Block
    $ bash certificate-generate.sh


  3. Code will give an output to insert course id, enter course id you want to generate, for example edX/edX101/2016_Run1
  4. Select Y to generate certificate and N to cancel.
  5. Done.

 


This is the source code explanation of the steps:

Code Block
languagebash
#!/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 "edXius, 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 Darth edXius, Start generating $idcourse "
           sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings awsproduction ungenerated_certs -c $idcourse --insecure
           break;;

   [nN]* ) exit;;

   * )     echo "edXius, just enter Y or N, please."; break ;;
  esac
done

...


Rizky.