Accept either a list of possible values, or a string as a value for
comparison of correctness in multiple choice. Multiple choice code is scattered and sometimes sends a list of choices for the value, and sometimes a single string. We used to use "in" which scarily handled both cases (list or substring search), but that caused a bug when you had two choices like choice_1 and choice10. Moving to == caused us to break when lists were sent to us. So this ugly code is extra paranoid and checks both possibilities. This really needs a better cleanup.
Showing
Please
register
or
sign in
to comment