Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4611

Assign: when you have some feedback saved in offline in grading, trying to leave always says there are changes that will be lost

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.3.0
    • Assignment add-on
    • Hide

      This issue only needs to be tested in 1 device.

      1. Create an assignment with "Feedback types > Feedback comments" enabled.
      2. In the app, login as a teacher and open the assign.
      3. Go to Participants and select any user. It doesn't matter if the user doesn't have a submission.
      4. Click "Grade".
      5. Go offline and enter any data in the grade and in feedback comments. In case you're using an assignment that already has data, make sure the feedback comments you're editing don't include images or media.
      6. Save changes (clicking the Grade button). Check that you see the offline data (grade and comments) and the app says that the grade isn't synced yet.
      7. Open the grade modal again. Check that in the modal you can see the data you entered while offline.
      8. Click the "X" button at the top without changing anything. Check that the modal is closed without asking for confirmation.
      9. Open the grade modal again, change the feedback comments (adding 1 letter is enough) and click the "X" button at the top . Check that now the app asks for a confirmation before closing the modal. Please notice the confirm says "Leave page" when it's a modal, but IMO it's not a big deal and I guess a lot of users won't understand the difference between a modal and a page.
      Show
      This issue only needs to be tested in 1 device. Create an assignment with "Feedback types > Feedback comments" enabled. In the app, login as a teacher and open the assign. Go to Participants and select any user. It doesn't matter if the user doesn't have a submission. Click "Grade". Go offline and enter any data in the grade and in feedback comments. In case you're using an assignment that already has data, make sure the feedback comments you're editing don't include images or media. Save changes (clicking the Grade button). Check that you see the offline data (grade and comments) and the app says that the grade isn't synced yet. Open the grade modal again. Check that in the modal you can see the data you entered while offline. Click the "X" button at the top without changing anything. Check that the modal is closed without asking for confirmation. Open the grade modal again, change the feedback comments (adding 1 letter is enough) and click the "X" button at the top . Check that now the app asks for a confirmation before closing the modal. Please notice the confirm says "Leave page" when it's a modal, but IMO it's not a big deal and I guess a lot of users won't understand the difference between a modal and a page.
    • MOODLE_403_STABLE
    • Moodle Apps Sprint 2025-I1.4

      How to reproduce:

      1. As a teacher, open an assign.
      2. Download it if needed.
      3. Go offline and open a submission.
      4. Click to edit "Feedback comments".
      5. Make some changes, and then save them in offline.
      6. 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.

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Isabel Renedo Rouco Isabel Renedo Rouco
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 29 minutes
                3h 29m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.