How to install and start E-commerce service in Open edX navetive installations (Ubuntu 16.04)

You are installing this on an AWS instance of Ubuntu 12.04, 64-bitYou have at least 30GB of space assigned to the root driveThese instructions are as current as of the Fiscus.3 platform release1. Update and install system dependencies

sudo apt-get update -y

sudo apt-get install -y build-essential software-properties-common python-software-properties curl git-core libxml2-dev libxslt1-dev libfreetype6-dev python-pip python-apt python-dev libxmlsec1-dev swig libmysqlclient-dev

sudo pip install --upgrade pip

sudo pip install --upgrade virtualenv

2. Clone the edx configuration repository and install edX and ecommerce

cd /var/tmp

git clone

cd /var/tmp/configuration

sudo pip install -r requirements.txt

sudo pip install setuptools --upgrade

cd /var/tmp/configuration/playbooks

nano -w edx_sandbox.yml

* Inside the edx_sandbox.yml file, change the SANDBOX_ENABLE_ECOMMERCE flag from False to True.

sudo ansible-playbook -c local edx_sandbox.yml -i "localh…

The proper way to install Ansible on Ubuntu 17.04

Because the ansible version comes with Ubuntu 17.04 is quite all (1.6.2), it may cause you troubles like missing module directory...

After a while, I figured that PIP is the best way to install Ansible on Ubuntu 17.04.

1. Install the needed libs:

$ sudo apt install libffi-dev libssl-dev libxml2-dev libxslt1-dev openssl-dev python-dev libffi-dev python-pip

2. Then install Ansible:

$ sudo pip install ansible

3. Fix AttributeError:'module' object has no attribute 'PROTOCOL_SSLv3' error when running Ansible:

4. Enjoy!

How to fix "AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'" err in Ubuntu 17.04

If for some reason you got this error in your Ubuntu 17.04 server:

AttributeError:'module' object has no attribute 'PROTOCOL_SSLv3'** try this to fix it:

$ sudo pip install requests==2.6.0


$ sudo pip install --upgrade requests

Set a custom screen resolution in Ubuntu 17.04

In some cases, I have to set my Ubuntu computer to run with a screen resolution that does not show up in the Settings (1366x768 or 16:9, because the monitor does not support it). Here is a pretty neat strick:

1. Check all the support screen sizes and device names:


Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
VGA-1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 410mm x 230mm
   1024x768      75.03    60.00
   800x600       75.00    60.32
   640x480       75.00    59.94
   720x400       70.08

Remember name of the device which is VGA-1.

2. Run the cvt command to calculate the VESA Coordinated Video Timing modes:

cvt 1366 768

# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz

Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync

Remember the modeline which is in bold.

3. Create a new mode with the xrandr:

sudo xrandr --nemode "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 7…

Another way to mass-enroll students/teachers into a Moodle course (using plugin)

One day, I want to enroll more than 100 students into a Moodle course but there's no built-in feature. Then I found this amazing plugin:

Plugin download URL:

1. Download the zip file from the above link

2. In your Moodle instance, go to Site administration > Plugins > Install plugins > upload the zip file and install the plugin

3. Prepare a csv file which has the following format:


Note: you can use either login (username) or idnumber

4. Go to the course you want to mass enroll students

5. Under Administration > Course administration > Users > Click Bulk enrolments and setup as following:

Click Choose file and upload the csv file.CSV delimiter -> select ","Encoding: UTF-8Role to assign: StudentFirst column contains: Email Address (or Login or Id number)Create group(s) if needed: NoCreate grouping(s) if needed: NoSend me a mail report: Yes
6. Click &qu…