December 22, 2020

Open Response Assessment (ORA) Using Filesystem as Storage in 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, ORA uses Amazon S3 as a storage for files uploaded via this component. Apart from using Amazon S3, ORA has alternative storage, one of which is the filesystem.

Following are the steps you need to take if you want the uploaded files to be stored on the Open edX server.

  1. Open dan edit file /edx/app/edxapp/edx-platform/lms/envs/common.py, then add the following syntax.
### ORA2 filesystem settings
ORA2_FILEUPLOAD_BACKEND = "filesystem"
ORA2_FILEUPLOAD_CACHE_NAME= "default"
ORA2_FILEUPLOAD_ROOT = os.path.join(MEDIA_ROOT, 'ora-upload/')
  1. Open dan edit file /edx/app/edxapp/lms.env.json, then find FILE_UPLOAD_STORAGE_BUCKET_NAME, the value still needs to be set even when using the filesystem method. For example, the value is set to ora2.

  2. Create a storage media directory and set the directory permissions that are created.

$ sudo mkdir -p /edx/var/edxapp/media/ora-upload/ora2/submissions_attachments
$ sudo chmod -R 775 /edx/var/edxapp/media/ora-upload/ora2
$ sudo chown www-data:www-data /edx/var/edxapp/media/ora-upload/ -R
  1. Until this stage the setup process has been completed, please restart the LMS service then test the upload file and download the uploaded file.

References