ualibraries / Guide-on-the-Side

The University of Arizona Libraries will no longer provide support for Guide on the Side. The code will remain openly available; however, UAL can no longer provide code fixes or upgrades.
https://ualibraries.github.io/Guide-on-the-Side/about.html
Other
66 stars 48 forks source link

Empty alert box appears when you attempt to save an empty question #110

Closed simpsonw closed 9 years ago

simpsonw commented 9 years ago

Steps to reproduce

  1. Create or edit a quiz
  2. Create or edit a question on the quiz
  3. Leave the "Question" field blank.
  4. Click the "Update" button.

    Expected behavior

I'm not 100% sure what the exact behavior should be, but IMO, you should get some kind of warning that the "Question" field is empty.

Actual behavior

An empty JavaScript alert pops up, which seems to be very confusing.

simpsonw commented 9 years ago

This seems to be an issue with app/webroot/js/questions/add.js, in particular the function add_edit_form_submit. I will look into this later.

simpsonw commented 9 years ago

I believe I have fixed this issue. It was actually the QuestionsController that was parsing the validation errors incorrectly. This is ready to be reviewed. I have made my changes in the gh_110_empty_alert_box branch.

michaelhagedon commented 9 years ago

Makes sense to me!