# Report Open Response (edx-ora2) bug. Cannot submit responses for courses with IDs greater than 70 characters

**URL:** <https://discuss.openedx.org/t/report-open-response-edx-ora2-bug-cannot-submit-responses-for-courses-with-ids-greater-than-70-characters/12368>\
**Category:** Development\
**Created:** [February 21, 2024, 11:10am UTC](https://discuss.openedx.org/t/report-open-response-edx-ora2-bug-cannot-submit-responses-for-courses-with-ids-greater-than-70-characters/12368 "2024-02-21T11:10:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anh\_Vu\_Nguy\_n](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/anh_vu_nguy_n/32/1740_2.png) [@Anh\_Vu\_Nguy\_n](https://discuss.openedx.org/u/Anh_Vu_Nguy_n)\
**Post date:** [February 21, 2024, 11:10am UTC](https://discuss.openedx.org/t/report-open-response-edx-ora2-bug-cannot-submit-responses-for-courses-with-ids-greater-than-70-characters/12368/1 "2024-02-21T11:10:42Z")

</div>

I went to [edx-ora2](https://github.com/openedx/edx-ora2/issues) repo but I could not create an issue there, and it suggested that I create a post in the forum so I post it here.

I’ve mentioned this before in [this post](https://discuss.openedx.org/t/why-does-ora-item-id-can-not-be-longer-than-128-characters/12033) but I didn’t make it clear as a bug report, so I create this post.

Let’s take the table openedx.assessment\_peerworkflow which is used by edx-ora2 for example.  
course\_id is varchar(255) and item\_id is varchar(128) but item\_id is generated based on course\_id so It make more sense that item\_id should have a longer length (course\_id length + 60 from my obeservation).

The current database design makes courses with IDs greater than 70 characters incompatible with edx-ora2.

I don’t know where exactly to fix this so I could not open an PR for this.

---

<div class="post-metadata">

**Author:** ![jill](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/jill/32/3188_2.png) [@jill](https://discuss.openedx.org/u/jill)\
**Post date:** [March 1, 2024, 1:51am UTC](https://discuss.openedx.org/t/report-open-response-edx-ora2-bug-cannot-submit-responses-for-courses-with-ids-greater-than-70-characters/12368/2 "2024-03-01T01:51:47Z")

</div>

Hi @Anh_Vu_Nguy_n , thank you for reporting this issue!

From looking at edx-platform, [UsageKeyFields tend to be 255 characters long](https://github.com/search?q=repo%3Aopenedx%2Fedx-platform+usagekeyfield&type=code&p=2), which is the same length as the course ID.

If I can describe what needs to be changed, would you be willing to submit a PR against edx-ora2 to address this issue? I’m a maintainer on that repository, so when you’re ready, you ping me `@pomegranited`, and I’ll review.

But if you don’t feel comfortable submitting a PR, that’s OK too! Just let me know, and I’ll look for someone else to do it.

So, to fix this, we need to update the `item_id` field’s `max_length` value in these three places:

- [StaffWorkflow model](https://github.com/openedx/edx-ora2/blob/5329fea43b917a44c393afe5297494828b5d259f/openassessment/assessment/models/staff.py#L35)
- [StudentTrainingWorkflow model](https://github.com/openedx/edx-ora2/blob/5329fea43b917a44c393afe5297494828b5d259f/openassessment/assessment/models/student_training.py#L26)
- [PeerWorkflow model](https://github.com/openedx/edx-ora2/blob/5329fea43b917a44c393afe5297494828b5d259f/openassessment/assessment/models/peer.py#L114)

Once that’s been updated, you can run `python manage.py makemigrations` to create a database migration file, then add that file to your commit. Running `python manage.py migrate` will apply the migration to your database, if you want to test it.
