uzh / marugoto

Marugoto: eLearning Framework for Story Telling
GNU General Public License v2.0
8 stars 6 forks source link

Standardize existing json files once a change has been made #41

Closed martindusinberre closed 5 years ago

martindusinberre commented 5 years ago

This is a question that directly arises from #39, but which I've wondered now for a long time: once a change has been made, is it possible to update all the json files so that the implementers (me, Lena, Leyla) are always dealing with the most up-to-date json file? At the moment, because of similar content, I have created json files (say, for HSA on day 4) based on previous json files (say, HSA day 1). But if we change a function in the day 1 json files, is there any way to cascade the changes so that day 4 only shows the new elements we have developed? (see, for one example, the different versions of notebookEntry1 which now exist, e.g. between 2.4.5.1.2.3 and 2.4.5.1.3.2).

interrogator commented 5 years ago

This would be a validator feature, but in my opinion, there is no feasible way to do this. The development time for a fairly unstable algorithm for this would far exceed the time saved.

Explanation: the JSON validator is fairly superficial compared to the importer, in terms of how it 'understands' the JSON. To add such code to the validator would take forever, and it's not in the scope of the importer to modify JSON. So I think we're kind of stuck.

@martindusinberre feel free to close if you feel this is now answered.

interrogator commented 5 years ago

After discussion: people can tell me what needs batch-changing in the JSON, I can make fixes. Just be very specific about what you want.

martindusinberre commented 5 years ago

Thanks Danny: that's the way we'll do it, so I'll close this issue now.