Simon-Initiative / oli-torus

Next Generation OLI Authoring and Delivery Platform
https://proton.oli.cmu.edu
MIT License
83 stars 35 forks source link

[BUG FIX] [MER-3422] Anomaly when editing overview info #4950

Closed gastonabella closed 2 months ago

gastonabella commented 3 months ago

MER-3422

This PR fixes an issue on the project's overview page. When updating some fields in the edit form, and then changing the Welcome Title, the previous changes were ignored and changed back to their original values.

Before:

https://github.com/Simon-Initiative/oli-torus/assets/26532202/bbf847eb-8364-4552-8409-1d10e91769df

After:

https://github.com/Simon-Initiative/oli-torus/assets/26532202/a30740f3-cff2-413b-9216-6deb482f05b4

andersweinstein commented 2 months ago

Note the problematic code also occurs in two other places:

Search for handle_event("welcome_title_change" to find.

These are less prominent than the Project Overview page so perhaps less important. Also it is not that hard to work around the anomaly by editing welcome title first, then any other fields.

(I am aware of this because when I put in a fix to handle the empty string as a welcome_title value , I put it in the same three different places which use similar form handling code. https://github.com/Simon-Initiative/oli-torus/pull/4938)