Commit Graph

1 Commits

Author SHA1 Message Date
Jon Jensen 8528cc4815 limit quizzes to 1000 questions, increase key limit. fixes #8172
changes quiz editing UI such that you can't exceed 1000 questions. quizzes
that already have over 1000 questions can still be edited, but new
questions cannot be added. this limit covers both regular questions as
well as question groups (e.g. "pick 20 of the following questions"). the
changes only affect the quiz UI and have no impact on question banks, or
on quizzes or banks created/updated via import.

also doubles the Rack::Utils.key_space_limit to 128 KB so that (most)
existing large quizzes can be taken successfully. this sets a rough upper
bound of ~1500 questions for a quiz.

test plan:
1. on the old code, create a quiz with > 1000 questions (easiest via
   question groups)
2. on the new code, confirm that you can edit and remove existing
   questions on the quiz.
3. confirm that you cannot add any questions (either standalone or via
   groups) until the total is below 1000 again
4. take a quiz with 1000 questions
5. confirm that you can submit the quiz without getting a 500 error

Change-Id: Ifa211ed5baa461351e747dac3266f77623626f3c
Reviewed-on: https://gerrit.instructure.com/10094
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-23 14:47:34 -06:00