November 17, 2021

Set Age Limit to Get Full Profile Feature on Open edX

Activities, Android Developer, Ansible, Apache2, Atlassian, Ayo Belajar Linux, Bestpath Network, BLC Telkom Klaten, BSD, Caddy Server, Case Study, Cisco, Cisco Indonesia, Cloud Computing, Cockpit, Custom Weapons, Docker, E-Learning, Engenius, Error, FreeBSD, FreeBSD Indonesia, Komunitas Pengguna Linux Indonesia, KPLI Bulukumba, KPLI Klaten, Lets Encrypt, Linux, MacOS, Microsoft Azure, Microsoft SQL Server, MikroTik, MikroTik Indonesia, MySQL, Nginx, Open edX, OpenSID, Others, PHP, phpMyAdmin, PostgreSQL, Proxmox, Python, Redash, Sendy, SSH, Stories, Subnetting, TP-Link, Ubiquiti, Unix, Virtualization, Windows, X-Mosque, Faizar Septiawan, Icar, siBunglonGanteng, Orang Ganteng, siBunglonLabs, Programmer, SysAdmin, Site Reliability Engineer, Developer, Palugada, Makassar, Ganteng, Gila, Cyclist, Panglima, Setan, Panglima Setan, sibunglon, Ganteng

By default Open edX allow to get full profile to user if user is over 13 year. But you can change it with custom age limit. To set it, follow the steps below:

  1. Go to Open edX server console.

  2. Open and edit LMS configuration (/edx/app/edxapp/lms.env.json or /edx/etc/lms.yml).

  3. Then find the PARENTAL_CONSENT_AGE_LIMIT configuration (add configuration PARENTAL_CONSENT_AGE_LIMIT if you can’t find it) and set with you custom age limit. See the following codes snippet, im set age limit to 7:

    ...
    PARENTAL_CONSENT_AGE_LIMIT: 7
    ...
    
  4. Restart LMS services.

  5. Update translations file because Open edX still to display age limit is 13 year.

    In my case default language on my Open edX env was set to Bahasa Indonesia (ID), so im update /edx/app/edxapp/edx-platform/lms/static/js/i18n/id/djangojs.js.

  6. Re-compile translations file.

    $ sudo -H -u edxapp bash
    $ source /edx/app/edxapp/edxapp_env
    $ cd /edx/app/edxapp/edx-platform
    $ paver i18n_fastgenerate
    
  7. Restart LMS and memcached service.