ucfopen / Materia

Engage students with easily embedded apps for online courses. Supercharge your course with compelling experiences and game mechanics.
https://ucfopen.github.io/Materia-Docs/
GNU Affero General Public License v3.0
36 stars 34 forks source link

[React branch] Save History feature is buggy and inconsistent #1404

Closed clpetersonucf closed 1 year ago

clpetersonucf commented 2 years ago

The save history feature, and by extension the qset-history component and the widget-creator component, appear to be inconsistently applying previously saved qsets. I'm noticing two behaviors:

  1. Given a pair of previous saves, the qset associated with a given save (based on edited time) is reversed
  2. Reverting to the currently edited qset continues to apply the saved qset instead
emanuelGitCodes commented 1 year ago

Digging around, I noticed in the widget-creator the qset id is getting lost. Specifically, the steps between setting

 // where the qset.id="258"
setQsetToReload({   
    data: JSON.parse(qset),
    version: version,
})

and

// qset.id="260, which is the latest version "sometimes"
setKeepQSet({ 
    data: qsetToReload.data,
    version: qsetToReload.version,
});
clpetersonucf commented 1 year ago

Resolved with creator rewrite