Configure Open Response Assessment
Adding ORA component to a Unit
ORA is enabled in Ironwood by default.
- Go to the specific unit > Click Problem > Click Advanced > Open Response Assessment.
- Now edit the component > Click Settings > File Uploads Response > Set to ‘Required’.
- Now upload file either in LMS or CMS, it will throw error.
For this error to resolve, you need to implement Storage Back-end mechanism (i.e S3, local filesystem etc). Here in this tutorial, we will walkthrough the configuration need to implement local filesystem back-end and storage.
Configuring Local FileSystem Back-end and Storage
Make a new directory.
mkdir /edx/var/edxapp/ora_uploads sudo chown www-data:edxapp /edx/var/edxapp/ora_uploads # Change ownership
Open files lms/envs/common.py and cms/envs/common.py on your favourite editor (eg: nano) and configure some keys.
ORA2_FILEUPLOAD_BACKEND = "filesystem" ORA2_FILEUPLOAD_CACHE_NAME="ora2-storage" ORA2_FILEUPLOAD_ROOT = "/edx/var/edxapp/ora_uploads"
Open files lms.env.json and cms.env.json. After that add the following settings.
# Add this to CACHE key "ora2-storage": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", "KEY_FUNCTION": "util.memcache.safe_key", "LOCATION": [ "localhost:11211" ] } # Replace the key "FILE_UPLOAD_STORAGE_BUCKET_NAME": "ORA_SUBMISSIONS"
Open the file /edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/openassessment/fileupload/backends/filesystem.py and add this function.
from django.core.urlresolvers import reverse_lazy, reverse def _get_url(self, key): key_name = self._get_key_name(key) # Change reverse_lazy to reverse url = reverse("openassessment-filesystem-storage", kwargs={'key': key_name}) return url
Open the file cms/urls.py
# Adding upload url url(r'^openassessment/storage', include(openassessment.fileupload.urls))
Restart the LMS and Studio for the changes to take effect.
sudo /edx/bin/supervisorctl restart lms cms