Skip to content

Conversation

@mtyaka
Copy link
Member

@mtyaka mtyaka commented Nov 16, 2016

This patch extends the course_id column to 255 characters.

Previous limit of 50 characters was too low, causing 500 errors when adding the 'Long Answer' block to a course with a course key extending 50 characters.

JIRA ticket: TNL-5932

Partner information: DavidsonX

Testing instructions:

Steps to reproduce:

  1. Install problem-builder xblock without this patch (v2.6.2).
  2. Create a new course with a long course key in Studio (choose long organization, course number and course run fields, for example: "VeryLongOrganizationName", "VeryLongCourseName", "VeryLongCourseRun2016")
  3. Add "problem-builder" to list of advanced modules in advanced settings.
  4. Create a new unit and add a 'Problem Builder' block.
  5. Add 'Long Answer' block to the problem builder block.
  6. Studio will report an error.

Steps to verify the fix:

  1. Install this branch of problem builder.
  2. Run migrations.
  3. Restart Studio.
  4. Verify that you can now successfully add 'Long Answer' components to the course that you created above.

Reviewers

It stores course keys, which can be longer than 50 characters.

Standard field size for course key fields in edx-platform is 255
characters, so extend our course_id field to 255 chars.
@pomegranited
Copy link
Contributor

👍 Works great, thanks @mtyaka !

  • I tested this on my devstack using the PR instructions.
  • I read through the code.
  • I checked for accessibility issues
  • Includes documentation

@mtyaka mtyaka merged commit 94bd72c into master Nov 17, 2016
@mtyaka mtyaka deleted the mtyaka/extend-course-id-field branch November 17, 2016 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants