-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.3.0
-
MOODLE_403_STABLE
How to reproduce:
- As a teacher, open an assign.
- Download it if needed.
- Go offline and open a submission.
- Click to edit "Feedback comments".
- Make some changes, and then save them in offline.
- After doing this, when you try to leave this submission it will always say there are changes that will be lost, but that's not true.
I think I found how to fix it. In AddonModAssignFeedbackCommentsHandlerService, in
hasDataChanged, I think initialText should come from offlineData?.plugindata, and if there's no offline data then it should use AddonModAssign.getSubmissionPluginText.
However, when looking at this I noticed that the function AddonModAssignFeedbackCommentsHandler.getTextFromInputData sometimes returns an object with text and format, but TS says it will always return a string. We need to review this carefully and update the types so they match the actual values.