Posts

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

Assumptions: You are installing this on an AWS instance of Ubuntu 12.04, 64-bit You have at least 30GB of space assigned to the root drive These instructions are as current as of the Fiscus.3 platform release 1. 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 https://github.com/edx/configuration 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...

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:  http://www.dangtrinh.com/2017/06/how-to-fix-attributeerror-module-object.html 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 Or $ 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: xrandr 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 +v...

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:  https://moodle.org/plugins/local_mass_enroll 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: email, student1@myschooldomain.com, student2@myschooldomain.com, ... 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-8 Role to assign: Student First column contains: Email Address (or Login or Id number) Create group(s) if needed: No Create grouping(s) if...

Moodle Installation error – Database MySQL version 5.5.31 is required and you are running 5.5.5.10.1.13

I got this error when trying to install Moodle 3.3 on a Ubuntu 16.04 server with MariaDB. Database MySQL version 5.5.31 is required and you are running 5.5.5.10.1.13 This is a workaround: Open config.php and change this: $CFG->dbtype = 'mysqli'; to $CFG->dbtype = 'mariadb';

How to remove accents from unicode characters using python

Sometimes unicode characters with accents cause you trouble (actually most of the time). You can even get rid of those characters or replace them with the base ones (without accents). Here is how to do the second method in Python: import unidecode your_text = u"Nguyễn Trọng Đăng Trình" your_non_accent_text = unidecode(your_text).encode('ascii') print your_non_accent_text Nguyen Trong Dang Trinh Reference:   https://pypi.python.org/pypi/Unidecode